当前位置:网站首页>log4j:WARN No such property [zipPermission] in org. apache. log4j. RollingFileAppender.
log4j:WARN No such property [zipPermission] in org. apache. log4j. RollingFileAppender.
2022-06-27 07:32:00 【The sky in July and August】
log4j:WARN No such property [zipPermission] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [logPermission] in org.apache.log4j.RollingFileAppender.
pom.xml
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<slf4j-api.version>1.7.36</slf4j-api.version>
</properties>
<!-- slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
Use
private static Logger LOGGER = LoggerFactory.getLogger(ThreadPoolExecutorTest.class);
LOGGER.info(" Execution time of this batch "+(System.currentTimeMillis() - startTime)/1000+" second ");
Print :
log4j:WARN No such property [zipPermission] in org.apache.log4j.RollingFileAppender.
log4j:WARN No such property [logPermission] in org.apache.log4j.RollingFileAppender.
2022-06-20 15:54:14.150+08:00 INFO [main] [com.xy.pool.ThreadPoolExecutorTest 67] Execution time of this batch 6 second
resource Add one under the directory log4j.properties
### Set up ###
log4j.rootLogger = debug,stdout,D,E
### Output information to control lifting ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
### Output DEBUG Log above level to =E://logs/error.log ###
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = E://logs/log.log
log4j.appender.D.Append = true
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
### Output ERROR Log above level to =E://logs/error.log ###
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File =E://logs/error.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
边栏推荐
- 请问如何在网页通过excel文件的形式向后段数据库添加数据
- Get the query parameter in the address URL specify the parameter method
- guava 教程收集一些案例慢慢写 google工具类
- RNA SEQ data analysis in R - investigate differentially expressed genes in the data!
- 碎煤机crusher
- Configuring FTP, enterprise official website, database and other methods for ECS
- ggplot2的自定义调色板
- Self test in the second week of major 4
- 用XGBoost迭代读取数据集
- JDBC transaction commit case
猜你喜欢
DMU software syntax highlighting VIM setting -- Learning Notes 6
Remote connection raspberry pie in VNC Viewer Mode
yarn create vite 报错 ‘D:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
Speech signal feature extraction process: input speech signal - framing, pre emphasis, windowing, fft- > STFT spectrum (including amplitude and phase) - square the complex number - > amplitude spectru
Error in idea connection database
Cookie加密6
Origin of forward slash and backslash
File and multipartfile overview
进程终止(你真的学会递归了吗?考验你的递归基础)
win10远程连接云服务器
随机推荐
1-4 decimal representation and conversion
【Kevin三连弹之三】Rust真的比C慢吗?进一步分析queen微测评
R language calculates Spearman correlation coefficient in parallel to speed up the construction of co occurrence network
(已解决) MINet 进行测试时报错如下 raise NotImplementedError
The song of cactus -- throwing stones to ask the way (1)
Coggle 30 Days of ML 7月竞赛学习
JDBC reads MySQL data list
Memory barrier store buffer, invalid queue
Get the query parameter in the address URL specify the parameter method
通过uview让tabbar根据权限显示相应数量的tabbar
Websocket database listening
JDBC parameterized query example
Talk about Domain Driven Design
log4j:WARN No such property [zipPermission] in org.apache.log4j.RollingFileAppender.
高薪程序员&面试题精讲系列116之Redis缓存如何实现?怎么发现热key?缓存时可能存在哪些问题?
攻防演习防御体系构建之第二篇之应对攻击的常用策略
专业四第二周自测
磁选机是什么?
再见了,敏捷Scrum
JDBC操作Mysql示例