Skip to content

Commit

Permalink
plugins logs start with "plugins." prefix (#65710)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov authored May 8, 2020
1 parent f9f2429 commit e35a743
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/core/server/logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ logging:
- context: plugins
appenders: [custom]
level: warn
- context: plugins.pid
- context: plugins.myPlugin
level: info
- context: server
level: fatal
Expand All @@ -180,14 +180,14 @@ logging:
Here is what we get with the config above:
| Context | Appenders | Level |
| ------------- |:------------------------:| -----:|
| root | console, file | error |
| plugins | custom | warn |
| plugins.pid | custom | info |
| server | console, file | fatal |
| optimize | console | error |
| telemetry | json-file-appender | all |
| Context | Appenders | Level |
| ---------------- |:------------------------:| -----:|
| root | console, file | error |
| plugins | custom | warn |
| plugins.myPlugin | custom | info |
| server | console, file | fatal |
| optimize | console | error |
| telemetry | json-file-appender | all |
The `root` logger has a dedicated configuration node since this context is special and should always exist. By
Expand Down Expand Up @@ -259,7 +259,7 @@ define a custom one.
```yaml
logging:
loggers:
- context: your-plugin
- context: plugins.myPlugin
appenders: [console]
```
Logs in a *file* if given file path. You should define a custom appender with `kind: file`
Expand All @@ -273,7 +273,7 @@ logging:
layout:
kind: pattern
loggers:
- context: your-plugin
- context: plugins.myPlugin
appenders: [file]
```
#### logging.json
Expand All @@ -282,10 +282,10 @@ the output format with [layouts](#layouts).

#### logging.quiet
Suppresses all logging output other than error messages. With new logging, config can be achieved
with adjusting minimum required [logging level](#log-level)
with adjusting minimum required [logging level](#log-level).
```yaml
loggers:
- context: my-plugin
- context: plugins.myPlugin
appenders: [console]
level: error
# or for all output
Expand Down

0 comments on commit e35a743

Please sign in to comment.