| Logger Name | Added Appenders | Additivity Flag | Output Targets | Comment |
|---|---|---|---|---|
| root | A1 | not applicable | A1 | The root logger is anonymous but can be accessed with the Logger.getRootLogger() method. There is no default appender attached to root. |
| x | A-x1, A-x2 | true | A1, A-x1, A-x2 | Appenders of "x" and root. |
| x.y | none | true | A1, A-x1, A-x2 | Appenders of "x" and root. |
| x.y.z | A-xyz1 | true | A1, A-x1, A-x2, A-xyz1 | Appenders in "x.y.z", "x" and root. |
| security | A-sec | false | A-sec | No appender accumulation since the additivity flag is set to
false
. |
| security.access | none | true | A-sec | Only
appenders of "security" because the additivity flag in "security" is
set to false
. |
本文详细介绍了不同层级的日志配置情况,包括根日志、特定命名空间下的日志配置及各自的附加器设置。解释了如何通过设置加性标志来控制日志的继承与累积行为,并展示了在不同场景下日志输出目标的变化。
2004

被折叠的 条评论
为什么被折叠?



