-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite
logger.rebuild()
based on discussion
This changes the internal implementation to have three "level" variables, since I kept getting myself twisted up in knots with the idea of using a boolean. This made the logic much clearer for me: - `inheritedLevel` is the last known level from the logger's parent (or WARN for the root logger). This is always set to something valid. - `defaultLevel` is the default level that has been set for this logger. - `userLevel` is the level that has been set for this logger via persistence or via `setLevel()`. (This is similar to what was `currentLevel`, but not quite the same.) The effective level of the logger is just `userLevel OR defaultLevel OR inheritedLevel`.
- Loading branch information
Showing
1 changed file
with
57 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters