Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine desired behavior of logger patternSetter after switching to rapids-logger #6203

Open
vyasr opened this issue Jan 2, 2025 · 0 comments

Comments

@vyasr
Copy link
Contributor

vyasr commented Jan 2, 2025

Currently cuml's logger supports setting a pattern in a way that is automatically reset via context management. This approach works because cuml's logger uses a single sink that is defined by cuml itself, and as a result asking for the current pattern via getPattern is well-defined. After the switch to rapids-logger in #6162, that will no longer be the case. The logger will be generalized to support an arbitrary number of sinks (like spdlog itself), meaning that there is no longer a well-defined concept of "the current pattern". While a logger can set a pattern and propagate that to all sinks, it cannot get a single pattern because different sinks could have different patterns set at any given time. As a result, in #6162 I have changed the behavior of the context to reset to the default pattern after the context completes instead of querying for a previous pattern. Once that PR merges we should decide whether that choice is acceptable, whether we want to make a different one, or if we should remove this functionality entirely in favor of a different implementation for the cases that need this sort of context management for logger patterns.

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

No branches or pull requests

1 participant