-
1. Re: how to define handler in wildfly 8.1.0
jaysensharma Dec 2, 2014 4:42 AM (in response to rituraj)In domain mode "jboss.domain.log.dir" is available to the the host controller. But the profiles based logging configurations are for JBoss servers (not for host controllers) so you should be rather using "jboss.server.log.dir"
<file relative-to="jboss.server.log.dir" path="jboss-console.log"/>
-
2. Re: how to define handler in wildfly 8.1.0
jamezp Dec 2, 2014 5:34 PM (in response to rituraj)What do you want logged to this file? Each server uses it's own jboss.server.log.dir relative-to directory and does not have access to the jboss.domain.log.dir. The process-controller and the host-controller use the jboss.domain.xxx.dir properties.
--
James R. Perkins -
3. Re: how to define handler in wildfly 8.1.0
rituraj Dec 2, 2014 11:51 PM (in response to jamezp)Thanks jay and james for replying ...
what i am trying to do is very similar which we use to do in the older jboss-versions as
LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_HOME/bin/domain.sh > $JBOSS_BASE_DIR/log/jboss-console.log 2>&1 &the above log file gives us the detail info for all the application-servers running on that host ...and we need not to go in each of server.log specifically...but the problem is wrt to rotate the log it looks as if the descriptor is still alive and we are not able to rotate it ...
-
4. Re: Re: how to define handler in wildfly 8.1.0
jaysensharma Dec 3, 2014 12:14 AM (in response to rituraj)1 of 1 people found this helpfulYou are just redirecting the STDOUT generated via the domain.sh to a file "$JBOSS_BASE_DIR/log/jboss-console.log 2>&1 &". In this case WildFly/Java process does not have control over the file "jboss-console.log". As this file is actually generated by Operating System redirect utility ">" , I am afraid that in this case you may need to be dependent on the OS level utilities like "logrotate" [1]
The STDOUT entries of domain controller is actually controlled by the "wildfly-8.1.0.Final/domain/configuration/logging.properties", like if you want to run the Host Controller in TRACE mode then you will need to edit this file and set it to TRACE level as following:
# Root logger level logger.level=${jboss.boot.server.log.level:TRACE} # Root logger handlers logger.handlers=BOOT_FILE,CONSOLE
Similarly you can control those host controller loggings and CONSOLE loggings using this file "logging.properties". Refer to [2] for more detailed informations on WildFly logging:
[1] http://linuxconfig.org/setting-up-logrotate-on-redhat-linux
[2] Logging Configuration - WildFly 8 - Project Documentation Editor
-
5. Re: how to define handler in wildfly 8.1.0
rituraj Dec 29, 2014 7:12 AM (in response to rituraj)Thanks for the reply Jay...
To rotate the log i mentioned above i have applied the below handler...and now its working as expected for me<periodic-rotating-file-handler name="jboss-console.log" autoflush="true"> <level name="ERROR"/> <formatter> <named-formatter name="PATTERN"/> </formatter> <file relative-to="jboss.domain.base.dir" path="log/jboss-console.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> and
<root-logger> <level name="INFO"/> <handlers> <handler name="CONSOLE"/> <handler name="FILE"/> <handler name="jboss-console.log"/> </handlers> </root-logger> by doing these 2 changes i am able to rotate my jboss-console.log file as below
-rw-rw-r--. 1 jboss jboss 103862 Dec 29 05:42 jboss-console.log-rw-rw-r--. 1 jboss jboss 273497 Dec 28 23:52 jboss-console.log.2014-12-27
-rw-rw-r--. 1 jboss jboss 92056 Dec 29 03:00 jboss-console.log.2014-12-28
-Rituraj