James is probably wondering whether your code is running in a web container, such as Tomcat. In that case, LogWeb might be able to help....
http://www.codeczar.com/products/logweb/ It works great for me! Jake At 11:38 PM 10/10/2006, you wrote: > >I'm don't quite understand the question. it's a java application. > > >James Stauffer wrote: >> >> In what kind of environment are you running? >> >> On 10/10/06, vincentw <[EMAIL PROTECTED]> wrote: >>> >>> Hi I'm new to using log4j and would like to know if I can change the >>> configuration of log4j while it is already running. I have passed my >>> log4j.xml to the DOMConfigurator and then I would like to change some >>> settings. >>> >>> Here is my log4j.xml file >>> <?xml version="1.0" encoding="UTF-8"?> >>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> >>> >>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >>> debug="false"> >>> >>> <!-- ==========Appenders========== --> >>> <!-- Define asyncAppender --> >>> <appender name="ASYNC" class="org.apache.log4j.AsyncAppender"> >>> <appender-ref ref="STDOUT"/> >>> <appender-ref ref="R"/> >>> </appender> >>> <!-- Define STDOUT to a console --> >>> <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> >>> <layout class="org.apache.log4j.PatternLayout"> >>> <param name="ConversionPattern" >>> value="%d{ISO8601} %-17X{ipAddress} [%t] [%p] - %m%n"/> >>> </layout> >>> </appender> >>> <!-- Define R; Rolling file logger --> >>> <appender name="R" class="org.apache.log4j.RollingFileAppender"> >>> <param name="File" value="logs/adminlog.txt"/> >>> <param name="MaxFileSize" value="100KB"/> >>> <param name="MaxBackupIndex" value="1"/> >>> <layout class="org.apache.log4j.PatternLayout"> >>> <param name="ConversionPattern" >>> value="%d{ISO8601} %-17X{ipAddress} [%t] [%p] - %m%n"/> >>> </layout> >>> </appender> >>> >>> <logger name="sql"> >>> <level value="off"/> >>> </logger> >>> >>> <!-- ==========Setup the Root category========== --> >>> <!-- rules for logging DEBUG<INFO<WARN<ERROR<FATAL. --> >>> <root> >>> <priority value = "error"/> >>> <appender-ref ref="ASYNC"/> >>> </root> >>> </log4j:configuration> >>> >>> >>> Now based on a user config file, I would like to change some of the >>> config >>> such as the MaxFileSize of the rolling file appender or the number of >>> backup >>> logs it keeps. I would also like to change the logging level of root or >>> sql. >>> >>> Is it possible to to this? If so, how do I go about doing this? >>> >>> Thanks in advance >>> -- >>> View this message in context: >>> >http://www.nabble.com/Can-I-change-log4j-configuration-programatically >--tf2420301.html#a6747745 >>> Sent from the Log4j - Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> -- >> James Stauffer http://www.geocities.com/stauffer_james/ >> Are you good? Take the test at http://www.livingwaters.com/good/ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > >-- >View this message in context: >http://www.nabble.com/Can-I-change-log4j-configuration-programatically >--tf2420301.html#a6750178 >Sent from the Log4j - Users mailing list archive at Nabble.com. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
