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

Option to add prefix to all logs #120

Open
singpolyma opened this issue Aug 10, 2021 · 3 comments
Open

Option to add prefix to all logs #120

singpolyma opened this issue Aug 10, 2021 · 3 comments

Comments

@singpolyma
Copy link

For a child logger, it can be useful to have a specified prefix string added to all logs.

@tilfin
Copy link
Owner

tilfin commented Sep 5, 2021

Can you provide some examples?

@singpolyma
Copy link
Author

The idea would be to allow something like:

child = logger.child
child.prefix = "LIBRARY66"

child.info("hai") # LIBRARY66 hai

@tilfin
Copy link
Owner

tilfin commented Sep 7, 2021

You can do that by applying your custom formatter.

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