Skip to content

Refactor CbcSolver logging with MDC context and fluent SLF4J#238

Closed
dwr-bli wants to merge 1 commit into
mainfrom
bli/cbcsolver-logging-mdc
Closed

Refactor CbcSolver logging with MDC context and fluent SLF4J#238
dwr-bli wants to merge 1 commit into
mainfrom
bli/cbcsolver-logging-mdc

Conversation

@dwr-bli

@dwr-bli dwr-bli commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR refactors logging in CbcSolver to improve observability and log consistency.

Changes

  • add MDC context tagging for CBC solver logs
  • add helper methods to set/clear solver MDC
  • wrap key entry points with try/finally to ensure MDC cleanup
  • migrate logger calls to fluent SLF4J style
  • use structured exception logging with setCause(e)

Notes

  • no intended solver algorithm change
  • core modeling / solving / warm-start / IIS logic remains the same
  • this is mainly a logging and maintainability improvement

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
9.0% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@dwr-zroy dwr-zroy force-pushed the bli/cbcsolver-logging-mdc branch from ce80c92 to 5ab1039 Compare May 1, 2026 16:09
@dwr-zroy dwr-zroy requested a review from zack-rma as a code owner May 1, 2026 16:09
@dwr-zroy

dwr-zroy commented May 1, 2026

Copy link
Copy Markdown
Collaborator

After discussion with @dwr-bli, we have decided that #246 is sufficient to address the logging needs for now. Closing.

@dwr-zroy dwr-zroy closed this May 1, 2026
@dwr-zroy dwr-zroy deleted the bli/cbcsolver-logging-mdc branch May 4, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants