You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restore the default logger when plugin loading fails #921
phlex::detail::run in phlex/app/run.cpp captures the default spdlog logger before loading resources, modules, sources, and the driver. A plugin can replace that logger. If a subsequent load throws, run() exits before restoring the captured logger. This can leave an unexpected default logger in place for in-process callers.
Required follow-up
After the project's exception-handling policy is defined, ensure that run() restores its captured default logger when plugin loading fails. Preserve the successful path: restore the logger before spdlog::cfg::load_env_levels() runs. Choose an implementation consistent with the exception-handling policy; a scope guard is one option, not a prescribed solution.
Acceptance criteria
A plugin that replaces the default logger followed by a failing component load does not leave the replacement logger installed after the error is handled.
Successful loading still restores the captured logger before applying environment log levels.
Add regression coverage for the failure path alongside the default-logger plugin test, if feasible under the selected exception-handling policy.
Activity