-
1. Re: how to get hold of JBoss logger configuration from an application
jamezp Aug 10, 2012 8:24 PM (in response to frank_luo)1 of 1 people found this helpfulI'm not sure I fully understand what you're after, but if you want the log directory it looks like it's stored in a system property.
final String logDir = System.getProperty("jboss.server.log.dir");
--
James R. Perkins
-
2. Re: how to get hold of JBoss logger configuration from an application
frank_luo Aug 13, 2012 2:45 PM (in response to jamezp)Thank James for quick reply.
My company has a hard rule to log everything to /var/log/ directory, so I have to use the following to re-direct the logger to the directory.
<paths> <path name="my.log.dir" path="/var/log/jboss"/> </paths> and
<periodic-rotating-file-handler ...>
<file relative-to="my.log.dir" path="my.log"/>
So the technique you illustrated here won't work.
Is there a way to get around this? Or it will also be great if you know how to customize "jboss.server.log.dir".
-
3. Re: how to get hold of JBoss logger configuration from an application
jamezp Aug 13, 2012 2:48 PM (in response to frank_luo)Frank,
You can definitely override the servers log directory if you want all logs to go to a different location. To test it just pass -Djboss.server.log.dir=/var/log/jboss. If that works, then you could just add that to the JAVA_OPTS on the standalone.conf.
--
James R. Perkins