Logging in JBoss AS is configured using the server/xxx/conf/jboss-log4j.xml file.
There is a MBean named jboss.system:service=Logging,type=Log4jService. It has various attributes and operations that you can use to change logging dynamically. In addition, if I remember correctly, JBoss AS will re-read the jboss-log4j.xml file periodically to catch any changes.
Peter Johnson wrote:Logging in JBoss AS is configured using the server/xxx/conf/jboss-log4j.xml file.
There is a MBean named jboss.system:service=Logging,type=Log4jService. It has various attributes and operations that you can use to change logging dynamically. In addition, if I remember correctly, JBoss AS will re-read the jboss-log4j.xml file periodically to catch any changes.
Yep, I also think the interval for checking the jboss-log4j.xml file is every 60 seconds. or is it every 5 minutes, it is one of those two. jboss-log4j.xml is the only configuration file in the server's conf directort that does not require a reboot.
date : File log should be generated once a month or once a day or once a minute
size : New file log should be generated after exceeding 10mb or 10 kb
no of files : max file index.
These are all allowed operations by FileAppender,RollingFileAppender,DailingRollingFileAppender
I want the Client to configure this VIA WEB CONSOLE.
eg: client can go online and say that the file max size should be 30MB.
(this is possible by using servlets/jsp/editing log4j.properties file, but my requirement is using webconsole)
By the way, I did find a way to do so: creating my own MBean and it worked too !! but the web console shows my custom method
setLoggerFilesize() with parameters "p1" "p2" and "p3" and description "(no description)", this is undesirable.
i found the custom approach simpler since it requires me to drop a sar file into the deploy folder rather than tweaking the server conf folder.
In the live environment, i may not have access to the conf folder