Hi Brett, this sounds like an interesting idea that's different from what I've tried so far. I'll see if I'll get that to work...
With kind regards, Piers Am 23.05.2013 um 01:31 schrieb Brett Randall: > Piers, > > I've not done this on JBoss 6. > > If your application uses Spring Framework, you could initialize log4j using > their org.springframework.web.util.Log4jConfigListener as described in this > blog [1]. > > If you aren't using Spring, you can still take a similar approach - create > a ServletContextListener and use it to configure log4j with a file of your > choosing. It sounds like you'll want something that's not on the > classpath, or at least is added to the classpath externally, or perhaps an > absolute or relative file path. > > [1] > http://rocksolutions.wordpress.com/2011/06/12/log4j-configuration-in-spring-application/ > > > On 20 May 2013 23:45, Piers Uso Walter <[email protected]> wrote: > >> Hi, >> >> I am migrating an application from JBoss 4 to JBoss 6 and stumble over the >> fact that log4j does not seem to be supported by JBoss 6 out of the box any >> more. >> >> I've researched this quite extensively on the web, but have only found >> questions from other people, no answers. I hope someone in the log4j >> community has successfully used log4j (1.2) with JBoss 6 and might be able >> to help. >> >> >> Our previous setup with a log4j.xml configuration file in >> server/default/conf/ no longer works. That configuration files does not >> seem to be detected and used by JBoss 6. >> Basic logging (as configured in server/default/deploy/jboss-logging.xml) >> works, but I have not been successful in configuring log4j appenders in >> that file. From what I understand, this file does not really configure >> log4j, as JBoss 6 uses a new logging mechanism. >> >> For example, I've modified jboss-logging.xml to use a log4j console >> appender and a log4j file appender instead of the standard appenders (see >> attached file). This did not work. The log file >> ${jboss.server.log.dir}/log4j.log is not created, the console log stays at >> level INFO (instead of DEBUG). >> >> What would I have to do in order to get JBoss 6 to use log4j for my >> applications? >> One requirement we have is to store the log4j configuration in a central >> file and not within the application packages (because for debugging >> purposes we ask our customers to modify the configuration). >> >> I'm using JBoss 6.1 final, in case that makes a difference. >> >> Thanks a lot >> Piers >> >> -- >> Piers Uso Walter <[email protected]> >> ilink Kommunikationssysteme GmbH >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
