开发者

jboss7 + same log4j configuration for different apps

开发者 https://www.devze.com 2023-04-12 03:18 出处:网络
I want to deploy some different applications using one jboss (jboss as 7). Can anyone make it clear for me if its possible to set one 开发者_开发技巧log4j configuration (log4j.xml) formultiple wars an

I want to deploy some different applications using one jboss (jboss as 7). Can anyone make it clear for me if its possible to set one 开发者_开发技巧log4j configuration (log4j.xml) for multiple wars and ears or i'll have to put a copy of configuration into each archive?

Or maybe someone can suggest a differeng logging engine, more native to jboss7?


log4j configuration is always global to runtime. ie. A JBoss instance can't have multiple log4j configuration. log4j can be initialized or reinitialized with a single config file. it can be a simple properties file or a XML incompliance with log4j.dtd packaged with log4j*.jar. start the jboss instance with -Dlog4j.configuration=/anypath/log4jconfig.xml


I do not believe there is a way to configure log4j globally. JBoss AS7 uses JBoss Logging for it's log provider. You can configure the logging subsystem is in the standalone.xml or the domain.xml depending on if you're running in standalone or domain mode.

The documentation is not greatest unfortunately, but if you install the jboss-as-logging_1_1.xsd in your IDE you can get auto-complete. All the schemas are located in the docs/schema under the installed directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号