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

Logger.handle should bubble up via Logger's parents, not parent Loggers' handlers directly #18

Open
ozataman opened this issue Jan 26, 2014 · 0 comments

Comments

@ozataman
Copy link

Shouldn't the semantics be such that the parent loggers are consulted per their log levels? The current implementation bypasses the parent loggers and goes to their Handlers directly.

Consider that:

  • rootLogger is initiated with a DEBUG level stderr logger
  • Therefore any logger in the system with a higher log level will implicitly log to stderr, even if the rootLogger level is set to WARNING or anything higher.
  • Notice how this bypasses the sensical check "Does the parent have adequate log level for this message?" It is enough for the parent's Handler to have adequate level, which is confusing.
  • There is no easy way to turn this off - one is forced to overwrite rootLogger handlers with setHandlers [] :: [GenericHandler Handle], which is just ugly.
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