How can I redefine jboss.server.log.dir in domain mode?
sbass Nov 28, 2014 2:49 AMHi,
FWIW, I've Googled for *hours* before posting...
I can edit domain.bat to redirect process-controller.log and host-controller.log. These then just become command line options:
rem Set the domain log dir if "x%JBOSS_LOG_DIR%" == "x" ( set "JBOSS_LOG_DIR=%JBOSS_BASE_DIR%\log" ) ... "-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\process-controller.log" ^ ... "-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\host-controller.log" ^
However, I also want to redirect boot.log and server.log for the server instances.
From domain.xml:
<periodic-rotating-file-handler name="FILE"> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler>
From hosts.xml:
<servers> <server name="Futrix1" group="Futrix-Group" auto-start="true"> <socket-bindings socket-binding-group="futrix-sockets" port-offset="200"/> </server> <server name="Futrix2" group="Futrix-Group" auto-start="false"> <socket-bindings socket-binding-group="futrix-sockets" port-offset="300"/> </server> <server name="Futrix9" group="Futrix-Group" auto-start="false"> <socket-bindings socket-binding-group="futrix-sockets" port-offset="900"/> </server> </servers>
So here is where the servers are defined, but I can't see how to redefine jboss.server.log.dir so it has a different value for each server instance???
Can I define jboss.server.log.dir in host.xml so that it will get picked up by domain.xml? Do I need to move the file handler code to host.xml?
I want the logs to go to:
E:\Logs\Lev1\JBoss\Futrix1\boot.log E:\Logs\Lev1\JBoss\Futrix1\server.log E:\Logs\Lev2\JBoss\Futrix2\boot.log E:\Logs\Lev2\JBoss\Futrix2\server.log E:\Logs\Lev9\JBoss\Futrix9\boot.log E:\Logs\Lev9\JBoss\Futrix9\server.log
respectively.
I've read this, but there's no guidance re: moving the location of all the log files, esp. in domain mode: https://docs.jboss.org/author/display/AS71/Logging+Configuration
Any help greatly appreciated. I've seen numerous Google hits re: standalone configuration, but none that addressed this issue in domain mode.
If this isn't the correct forum for this question please advise alternatives.
Thanks,
Scott