mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
feat: improved doc'n for category hierarchy
This commit is contained in:
parent
04f65044a5
commit
045a1feef0
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,3 +23,6 @@ _site
|
||||
Gemfile.lock
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
||||
#personal config
|
||||
.env
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user