java - JBoss AS6 app specific logging -
i'm migrating old web apps from jboss 4.2.2 6.0.0 (as6). in as6 have proprietary format logging applications through file named jboss-logging.xml
.
after read stuff (http://community.jboss.org/wiki/separatingapplicationlogs) reach conclusion "(...)starting jboss 6.0.0.m2 ability log separate log files, per application, implemented in different way" , documentation "(...) updated more details, once implementation ready".
however able create specific application log files in server/log
dir, done using main joboss-logging.xml
file in server/deploy
dir. not compatible modularity applications demand.
so here problem when create jboss-logging.xml
e web-inf
dir app whit configuration:
<?xml version="1.0" encoding="utf-8"?> <logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0" context="myapp"> <define-context name="myapp" /> <periodic-rotating-file-handler file-name="${jboss.server.log.dir}/myapp.log" name="webapp" autoflush="true" append="true" suffix=".yyyy-mm-dd"> <error-manager><only-once/></error-manager> <formatter> <pattern-formatter pattern="%d %-5p [%c] (%t) %s%e%n"/> </formatter> </periodic-rotating-file-handler> <root-logger> <!-- set root logger priority via system property, default value. --> <level name="${jboss.server.log.threshold:info}"/> <handlers> <handler-ref name="webapp"/> </handlers> </root-logger> </logging>
i following error when app starts:
8:57:07,765 error [abstractkernelcontroller] error installing configured: name=logging:registration:myapp:anonymous-0 state=instantiated: java.lang.runtimeexception: error configuring property: selector logging:registration:myapp:anonymous-0 @ org.jboss.kernel.plugins.dependency.configureaction.dispatchsetproperty(configureaction.java:112) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.configureaction.setattributes(configureaction.java:85) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.configureaction.installactioninternal(configureaction.java:44) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.installsawareaction.installaction(installsawareaction.java:54) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.installsawareaction.installaction(installsawareaction.java:42) [jboss-kernel.jar:2.2.0.ga] (...) caused by: java.lang.illegalargumentexception: wrong arguments. setselector target org.jboss.logging.metadata.classloaderregistrationhelper@1a4eb51 expected=[org.jboss.logmanager.classloaderlogcontextselector] actual=[org.jboss.logmanager.logcontextselectorservice] @ org.jboss.reflect.plugins.introspection.reflectionutils.handleerrors(reflectionutils.java:404) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.reflect.plugins.introspection.reflectionutils.invoke(reflectionutils.java:74) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.reflect.plugins.introspection.reflectmethodinfoimpl.invoke(reflectmethodinfoimpl.java:168) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.beans.info.plugins.defaultpropertyinfo.set(defaultpropertyinfo.java:143) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.beans.info.plugins.beaninfoutil.set(beaninfoutil.java:177) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.beans.info.plugins.abstractbeaninfo.setproperty(abstractbeaninfo.java:289) [jboss-reflect.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.propertydispatchwrapper.execute(propertydispatchwrapper.java:114) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.executionwrapper.execute(executionwrapper.java:47) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.kernelcontrollercontextaction.dispatchexecutionwrapper(kernelcontrollercontextaction.java:125) [jboss-kernel.jar:2.2.0.ga] @ org.jboss.kernel.plugins.dependency.configureaction.dispatchsetproperty(configureaction.java:107) [jboss-kernel.jar:2.2.0.ga] ... 64 more
i grateful kind of info or direction on subject, 1 represents using complete different approach logging in as6. although feel i'm getting closer solution... thank in advance.
the post here mine
this bug, it's reported here: https://issues.jboss.org/browse/jblogging-56
i tried workaround mention, couldn't work either. unfortunately, new logging framework in jboss 6 seems buggy , undocumented @ moment.
Comments
Post a Comment