Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
default_logger
lkdvos
force-pushed
the
layered-logging
branch
from
November 9, 2026 15:43
0aa85e3 to
5880112
Compare
lkdvos
marked this pull request as ready for review
November 9, 2026 15:58
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes logging compose across nested scopes and nested solves.
solvedescends one level in the logger: a solve namednameuses thename => loggerentry of the currentAlgorithmLogger, and makes it the current logger while it runs. Actions are therefore given per solve, e.g.with_algorithmlogger(:HeronAlgorithm => AlgorithmLogger(:PostStep => action)), and no longer reach subproblems solved from withinstep!.solveandsolve!take anamekeyword, defaulting toalgorithm_name(algorithm), the name of the type of the algorithm unless overloaded. An algorithm that solves several subproblems with the same algorithm can give each its own name.with_algorithmloggeradds to the enclosing logger instead of replacing it. A context present in both runs the outer action first.NoLogging()silences a single context, also when it was set by an enclosing scope.with_algorithmlogger(...; inherit = false)discards the enclosing scopes, andwith_algorithmloggeralso accepts anAlgorithmLogger, which is now exported.This change is breaking: existing
with_algorithmlogger(:PostStep => action)calls need to name the solve they apply to.