时间:2021-07-01 10:21:17 帮助过:31人阅读
最近在 学习 LogBack相关内容,貌似这东西是Log4j的升级,根据官方说法具体信息参见http://logback.qos.ch/documentation.html,其写文件速度是8或9个微秒,写数据库的时间也在几个毫秒。说是对多线程的日志写入的性能有了大幅度的提升。当前logback有以下几
最近在学习LogBack相关内容,貌似这东西是Log4j的升级,根据官方说法具体信息参见http://logback.qos.ch/documentation.html,其写文件速度是8或9个微秒,写数据库的时间也在几个毫秒。说是对多线程的日志写入的性能有了大幅度的提升。当前logback有以下几个核心类库:
类库名称 | 是否必要 |
logback-access-1.0.13.jar | 非必要 |
logback-classic-1.0.13.jar | 必要 |
logback-core-1.0.13.jar | 必要 |
slf4j-api-1.7.5.jar | 必要 |
MqClearLog.log MqClearLog-%d{yyyy-MM-dd}.%i.log 100MB %msg%n
引用
16:22:41,200 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
16:22:41,200 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
16:22:41,200 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.xml]
16:22:41,201 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Setting up default configuration.
16:22:41.247 [main] INFO chapters.configuration.MyApp2 - Entering application.
16:22:41.249 [main] DEBUG chapters.configuration.Foo - Did it again!
16:22:41.249 [main] INFO chapters.configuration.MyApp2 - Exiting application.