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

Add support for printout(node_name: str) #32

Open
bestekov opened this issue Nov 1, 2024 · 1 comment
Open

Add support for printout(node_name: str) #32

bestekov opened this issue Nov 1, 2024 · 1 comment

Comments

@bestekov
Copy link

bestekov commented Nov 1, 2024

In an environment with a lot of different loggers configured (especially by 3rd party modules) it would be useful to be able to filter the tree to a particular starting root. The printout method has a node parameter, but it appears to require passing a node object rather than the name of the node.

Is there a way to either easily get a node object by name? Barring that would ideally like to be able to pass the name of the target logger to the printout method.

@brandon-rhodes
Copy link
Owner

I think that the Standard Library call logging.getLogger() will let you pass a name, and return its node. Try it out and see whether it works!

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

2 participants