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

Addition of Logger.getAll() method as discussed in #970 #2515

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

prkbuilds
Copy link

Related Issue : #970

As discussed in issue #970, this PR introduces a new method that returns a Map. This enhancement allows users to retrieve all loggers that match a given regex pattern, providing a convenient way to manage and configure multiple loggers at once.

With this new functionality, users can now establish mass control over their loggers by iterating over the returned Map, making bulk configuration and modifications simpler and more efficient. This change is aimed at improving flexibility and easing the management of logger configurations in large-scale applications.

@DABH PR for the changes I thought about, let me know if you are looking for a different approach for this feature.

Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM up to a couple formatting/nits

lib/winston/container.js Outdated Show resolved Hide resolved
lib/winston/container.js Outdated Show resolved Hide resolved
@DABH
Copy link
Contributor

DABH commented Oct 14, 2024

@PratikFandade Can you please also add at least one simple test for this new function, so that coverage doesn't decrease? Thanks!

@prkbuilds
Copy link
Author

Hey @DABH ! So sorry for being away and thanks for the change on formatting. I will start working on a test for this and update the PR so the coverage is there for this functionality.

@prkbuilds
Copy link
Author

I've added some unit test coverage for this new functionality as discussed, let me know if you know if this can be improved further!

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

Successfully merging this pull request may close these issues.

2 participants