admin管理员组文章数量:1431720
I'm using Log4j - 2.22.1. version and wildfly- 31.0.1.Final Loggers are printing in local But, while deploying it on openshift the loggers are not printing after the ear is deployed and i checked the logs that printed before deployment and i found a error like this
ERROR [stderr] (MSC service thread 1-3) ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
this are the dependencies using
implementation '.apache.logging.log4j:log4j-core:2.22.1'
implementation '.apache.logging.log4j:log4j-api:2.22.1'
Tried Adding this Dependency to the lib but didn't worked
implementation '.apache.logging.log4j:log4j-to-slf4j:2.21.1'
Tried adding log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{1}] %m%n"/>
</Console> <File name="File" fileName="logs/app.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{1}] %m%n"/>
</File>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
<AppenderRef ref="File"/>
</Root>
<Logger name=".jboss" level="info" additivity="false">
<AppenderRef ref="Console"/>
<AppenderRef ref="File"/>
</Logger>
</Loggers>
</Configuration>
and excluded wildfly logging subsystem in jboss-deployment but didn't worked
<exclude-subsystems>
<subsystem name="logging"/>
</exclude-subsystems>
I'm using Log4j - 2.22.1. version and wildfly- 31.0.1.Final Loggers are printing in local But, while deploying it on openshift the loggers are not printing after the ear is deployed and i checked the logs that printed before deployment and i found a error like this
ERROR [stderr] (MSC service thread 1-3) ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
this are the dependencies using
implementation '.apache.logging.log4j:log4j-core:2.22.1'
implementation '.apache.logging.log4j:log4j-api:2.22.1'
Tried Adding this Dependency to the lib but didn't worked
implementation '.apache.logging.log4j:log4j-to-slf4j:2.21.1'
Tried adding log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{1}] %m%n"/>
</Console> <File name="File" fileName="logs/app.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{1}] %m%n"/>
</File>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
<AppenderRef ref="File"/>
</Root>
<Logger name=".jboss" level="info" additivity="false">
<AppenderRef ref="Console"/>
<AppenderRef ref="File"/>
</Logger>
</Loggers>
</Configuration>
and excluded wildfly logging subsystem in jboss-deployment but didn't worked
<exclude-subsystems>
<subsystem name="logging"/>
</exclude-subsystems>
Share
Improve this question
edited Nov 20, 2024 at 6:40
Paul
asked Nov 19, 2024 at 8:18
PaulPaul
113 bronze badges
9
|
Show 4 more comments
1 Answer
Reset to default 0Upgrade from log4j2 to slf4j-2.x fixed the issue
本文标签: loggingLoggers are not printing on OpenShift Console after deploymentStack Overflow
版权声明:本文标题:logging - Loggers are not printing on OpenShift Console after deployment - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745576659a2664371.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
jboss-deployment-structure.xml
as well. – James R. Perkins Commented Nov 21, 2024 at 20:41