Skip to content

do not return early in highsLogUser if there are (log) callbacks#2849

Closed
svigerske wants to merge 1 commit into
latestfrom
fix-loguser-with-callbacks
Closed

do not return early in highsLogUser if there are (log) callbacks#2849
svigerske wants to merge 1 commit into
latestfrom
fix-loguser-with-callbacks

Conversation

@svigerske
Copy link
Copy Markdown
Collaborator

With 1.13.1, HiGHS stopped printing output through log callbacks when one disables log_to_console; #2838 (comment).

This fixes that by not returning early in highsLogUser if callbacks are around.

One may still want to fix that with log_to_console enabled and callbacks present, the callbacks are called twice, instead of sending the log once to the callback and once to the console.

@jajhall
Copy link
Copy Markdown
Member

jajhall commented Feb 12, 2026

Thanks, but the desired behaviour is to have console/file logging and callback logging completely independent. Only if both are off does HighsLogUser (and HighsLogDev) return immediately.

I'll fix this, and create a unit test

@svigerske
Copy link
Copy Markdown
Collaborator Author

OK. I didn't read until highsLogDev. :)

I'm happy if you just take over this PR, or start a new one.

I've a fix that works for me now.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.33%. Comparing base (f3cf9ff) to head (4121967).
⚠️ Report is 2 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2849      +/-   ##
==========================================
- Coverage   80.33%   80.33%   -0.01%     
==========================================
  Files         348      348              
  Lines       86310    86311       +1     
==========================================
  Hits        69336    69336              
- Misses      16974    16975       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants