refactor(logging): localize core observability logging with direct Logger#249
refactor(logging): localize core observability logging with direct Logger#249nshkrdotcom wants to merge 5 commits intoagentjido:mainfrom
Conversation
2cb6299 to
7e0e853
Compare
| end) | ||
| else | ||
| Logger.warning("Jido.Signal.Dispatch not available, skipping error signal emit") | ||
| Logger.warning(fn -> "Jido.Signal.Dispatch not available, skipping error signal emit" end) |
There was a problem hiding this comment.
It's unclear the benefits we'd have for using a function inside warning/1
There was a problem hiding this comment.
It's for lazy evaluation, just a performance tweak
mikehostetler
left a comment
There was a problem hiding this comment.
Two blocking findings from review:
-
lib/jido/observe.exremoves the publicJido.Observe.log/3facade and the shippedJido.Observe.Logmodule. That is a breaking API change for downstream callers, not just an internal refactor, so existing users will start hittingUndefinedFunctionErrorafter upgrade unless this is kept as a compatibility shim or deprecated first. -
lib/jido/observe/config.exstill resolvesobserve_log_level/1, andJido.Debugstill writes:observe_log_leveloverrides, but after deletingJido.Observe.Logthere is no runtime consumer left for that setting. That silently turnsconfig :jido, :observability, log_level: ...and the related debug override path into dead config, which is a behavior regression even if callers never used the removed facade.
Introduced Jido.Observe.Log to centralize threshold-based logging logic. Added Jido.Observe.log/3 as a facade to maintain compatibility with the existing observability API. The implementation respects both the global Jido observability configuration and per-instance overrides via Jido.Debug. Includes comprehensive test coverage for threshold enforcement and instance metadata handling.
|
Ready for review. Went with compatibility shim rather than tagging as |
Summary
LoggerdirectlySupersedes
Mike-Requested Rework
Jido.Observe.Log/ helper logging api spreadLoggercallsWhat This PR Keeps
Additional Work
Implementation
Tests
receive ... after :infinitytest constructImpact
jidologging defaults remain at the historical:infobaselineRisks
Testing
mix testmix q