I am posting this message in this forum, since It is a core Java question, however I am facing this problem while doing log4j implementation.
Hi
I have a web application in which i am using log4j for logging. I have specified the config entries for a class like following:
log4j.logger.com.Test=DEBUG, TestLog
log4j.appender.TestLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.TestLog.File=D:/WebService/logs/WatchdogSocketSPIN.log
log4j.appender.TestLog.layout=org.apache.log4j.PatternLayout
log4j.appender.TestLog.layout.ConversionPattern=[%5p] %d{dd MMM yyyy HH:mm:ss,SSS} [%C] - %m%n
log4j.appender.TestLog.DatePattern='.'yyyy-MM-dd
Now I have to give the user, an option to change the logging level from the GUI. Now If the user changes the log level from DEBUG to ERROR then I need to update the corresponding entry in the config file also.
I have a set of 4-5 classes for which I have to change the log level in the log4j config entries, since I am using different log files fro different classes.
Can anyone let me know that how can I do this???
Thanks in Advance
Inder Jeet Singh