当您不为log4j2提供配置时,我们都熟悉此消息:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
如何检查log4j2是否尚未配置,以便在需要时可以使用默认配置进行初始化?
项目工件结构是:
test.ear
--lib - has all log4j2 jars core, web, bridge and JCL
--META-INF -- has app.xml, JBoss specific deployment XML, and manifest file
--a.war -- each war has web.xml with log4jConfiguration and Log4jServletContextListener specified.
--b.war
--c.war
war使用log4jConfiguration创建上下文,即"c
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
01:16:25.288 [Client thread] ERROR net.
我正在寻找一个完整的log4j2支持的属性列表。下面链接上的log4j2文档只给出了属性的子集。
For ex:
Delete files older than 30 days
appender.rolling.strategy.delete.ifLastModified.age = 30d
这在手册中没有列出。有什么建议我能找到名单吗?
我有一个用ejb和war打包的Java应用程序。以下是耳朵的结构:
myapp.ear
-lib
-META-INF
-ejbjar1.jar
-ejbjar2.jar
-mywebapp.war
我需要使用log4j2,所以我首先尝试通过遵循从web.xml配置它,但是当我在EJB中创建Logger时,它正在抛出:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
给出的指令对我来说不太清楚,但我理解我需