禁止用于商业用途 Logback 手册中文版
III
4.5. Logback Access .......................................................................................... 89
4.5.1. SocketAppender .................................................................................. 89
4.5.2. SMTPAppender ................................................................................... 89
4.5.3. DBAppender ....................................................................................... 90
4.5.4. SiftingAppender .................................................................................. 92
5. Encoder ................................................................................................................... 94
5.1. 什么是 encoder .......................................................................................... 94
5.2. Encoder 接口 ............................................................................................. 94
5.3. LayoutWrappingEncoder ............................................................................. 95
5.4. PatternLayoutEncoder ................................................................................. 96
6. 排版(Layout)....................................................................................................... 97
6.1. 什么是 layout ............................................................................................ 97
6.2. Logback-classic .......................................................................................... 97
6.2.1. 自定义 layout ..................................................................................... 97
6.2.2. PatternLayout .....................................................................................101
6.2.3. 转换符说明 .......................................................................................103
6.2.4. 格式修饰符 .......................................................................................107
6.2.5. 圆括号的特殊含义.............................................................................108
6.2.6. 求值式(Evaluator).......................................................................... 110
6.2.7. 创建自定义格式转换符...................................................................... 115
6.2.8. HTMLLayout ..................................................................................... 117
6.3. Logback access.......................................................................................... 119
6.3.1. 自定义 layout .................................................................................... 119
6.3.2. PatternLayout ..................................................................................... 119
6.3.3. HTMLLayout .....................................................................................122
7. 过滤器(Filter).....................................................................................................123
7.1. 在 logback-classic 里 .................................................................................123
7.1.1. 常规过滤器 .......................................................................................123
7.1.2. TurboFilters .......................................................................................132
7.1.3. 重复消息过滤器(DuplicateMessageFilter)........................................135