feat: improved doc'n for category hierarchy

This commit is contained in:
Paul Harapiak 2019-04-30 08:22:04 -04:00
parent 04f65044a5
commit 045a1feef0
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -23,3 +23,6 @@ _site
Gemfile.lock
Dockerfile
docker-compose.yml
#personal config
.env

View File

@ -2,7 +2,7 @@
`Level` - a log level is the severity or priority of a log event (debug, info, etc). Whether an _appender_ will see the event or not is determined by the _category_'s level. If this is less than or equal to the event's level, it will be sent to the category's appender(s).
`Category` - a label for grouping log events. This can be based on module (e.g. 'auth', 'payment', 'http'), or anything you like. Log events with the same _category_ will go to the same _appenders_. Log4js supports a simple hierarchy for categories, using dots to separate layers - for example, log events in the category 'myapp.submodule' will use the appenders defined for 'myapp' if none are defined for 'myapp.submodule'. The category for log events is defined when you get a _Logger_ from log4js (`log4js.getLogger('somecategory')`).
`Category` - a label for grouping log events. This can be based on module (e.g. 'auth', 'payment', 'http'), or anything you like. Log events with the same _category_ will go to the same _appenders_. Log4js supports a hierarchy for categories, using dots to separate layers - for example, log events in the category 'myapp.submodule' will use the level for 'myapp' if none is defined for 'myapp.submodule', and also any appenders defined for 'myapp'. (This behaviour can be disabled by setting inherit=false on the sub-category.) The category for log events is defined when you get a _Logger_ from log4js (`log4js.getLogger('somecategory')`).
`Appender` - appenders are responsible for output of log events. They may write events to files, send emails, store them in a database, or anything. Most appenders use _layouts_ to serialise the events to strings for output.