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

Documentation and/or enhancements for package developers. #159

Closed
RazerM opened this issue Oct 30, 2015 · 1 comment
Closed

Documentation and/or enhancements for package developers. #159

RazerM opened this issue Oct 30, 2015 · 1 comment

Comments

@RazerM
Copy link
Collaborator

RazerM commented Oct 30, 2015

It would be interesting to see a proposed implementation for developers to use logbook for their own modules.

In the past I have used a modulename/log.py file which instantiates a Logger instance (disabled by default), with the other python files doing from .log import logger.

For example, I'm trying to think how sqlalchemy would use Logbook rather than logging, since they make use of nested loggers quite well.

Would the logbook way be to have a Logger instance in sqlalchemy/engine and sqlalchemy/pool?

@vmalloc
Copy link
Collaborator

vmalloc commented Oct 30, 2015

I think the real question is why nested loggers are used. It's usually not only to organize the names better - it's to reuse the handlers on the parent logger.

Logbook does not associate handlers for specific loggers, but rather chooses a centralized handler stack with multiple loggers writing to the same stack...

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