JBoss AS6 app specific logging

I'm currently migrating old web apps from JBoss As 4.2.2 to 6.0.0 (AS6). In AS6 we have a proprietary format for logging applications through a file named jboss-logging.xml.

After read some stuff (http://community.jboss.org/wiki/SeparatingApplicationLogs) reach the conclusion that "(...)starting with JBoss AS 6.0.0.M2 the ability to log to separate log files, per application, will be implemented in a different way" and also that the documentation "(...) will be updated with more details, once the implementation is ready".

However I was able to create the specific application log files in my server/log dir, it was done using the main joboss-logging.xml file in the server/deploy dir. This is not compatible with the modularity my applications demand.

So here the problem when I create a jboss-logging.xml e my WEB-INF dir for my app whit this configuration:



   

   
      
      
         
      
   

   
      
      
      
         
      
   


I get the following error when my app starts:

8:57:07,765 ERROR [AbstractKernelController] Error installing to Configured: name=Logging:REGISTRATION:myApp:Anonymous-0 state=Instantiated: java.lang.RuntimeException: Error configuring property: selector for Logging:REGISTRATION:myApp:Anonymous-0
          at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:112) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:85) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:44) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
          at 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 for target org.jboss.logging.metadata.ClassLoaderRegistrationHelper@1a4eb51 expected=[org.jboss.logmanager.ClassLoaderLogContextSelector] actual=[org.jboss.logmanager.LogContextSelectorService]
          at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:404) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:74) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.beans.info.plugins.BeanInfoUtil.set(BeanInfoUtil.java:177) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.beans.info.plugins.AbstractBeanInfo.setProperty(AbstractBeanInfo.java:289) [jboss-reflect.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:114) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]
          at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:107) [jboss-kernel.jar:2.2.0.GA]
          ... 64 more

I will be grateful for any kind of info or direction on this subject, even one that represents using a complete different approach to logging in AS6. Although I feel I'm getting closer to the solution... Thank you in advance.


The post here is also mine

7
задан rsilva4 16 February 2011 в 16:18
поделиться