AW: DailyRollingFileAppender with filesize option
Hi, some time ago i wrote the following to the log4j-dev mailing list: Hi, I had several problems with the DailyRollingFileAppender (see user mailing list), so I downloaded the DailyRollingAppenderExt.jar but I can't find the source of this file again (so I also can't find out the author of this Class). I extended this class so that the Appender rolls by date AND by size, like the CompositeRollingFileAppender does, with the difference that it logs to a different file every day, without having to rename any files (that was the problem with threads logging to yesterday's dir because the Java method renameTo() fails in the RollingFileAppender or the CompositeRollingFileAppender. My question is: Are you interested in this Appender? and if so, do you know who the original author of DailyRollingFileAppenderExt was? I would like to give this appender out to the people searching for something like that in the mailing list, it's almost an FAQ, but I would like to ask the original author before. So if someone finds out the the author of the original DailyRollingFileAppenderExt please tell me, that I can give out the modified one to the people who want it. -Ursprüngliche Nachricht- Von: Manju Joseph [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 30. November 2003 03:08 An: [EMAIL PROTECTED] Betreff: Fwd: DailyRollingFileAppender with filesize option Hello.., Me too getting the same error.Can any one help MANJU From: Divya Shetty [EMAIL PROTECTED] Reply-To: Log4J Users List [EMAIL PROTECTED] To: Log4J Users List [EMAIL PROTECTED] Subject: DailyRollingFileAppender with filesize option Date: Sat, 29 Nov 2003 14:30:46 +0530 In the CompositeRollingAppender, the reference made to setFile provides a String and boolean as parameter while the setFile in FileAppender which accepts two arguments expects Layout and Boolean. Hence am unable to compile ti.. None in our project has used log4J before and the lack of time is causing to be a deterent in workign it out for ourselves. Would it be possible to either download the CompositeRollingAppender.class or the jar which has been updated with the CompositeRollingAppender.class ? - Original Message - From: Divya Shetty To: Log4J Users List Sent: Saturday, November 29, 2003 1:32 PM Subject: Fw: DailyRollingFileAppender with filesize option I downloaded log4j-1.2.8.jar. Along with this i found the CompositeRollingAppender.java in the contributions folder. In this file, on line 362 the method super.setFile(fileName, append) is called. In the FileAppender, there is no overloaded method where only two arguments are provided and hence it fails in the compilation. Is this a known issue or has someone already resolved it? Thanks Divya - Original Message - From: Divya Shetty To: Log4J Users List Sent: Saturday, November 29, 2003 11:00 AM Subject: DailyRollingFileAppender with filesize option Hi, I have the following log4j property file: log4j.rootLogger=debug, A log4j.logger.SickPay=debug, SP log4j.appender.SP=org.apache.log4j.DailyRollingFileAppender log4j.appender.SP.File=COMMON~1\\Trial\\SP.log log4j.appender.SP.MaxFileSize=1KB log4j.appender.SP.MaxBackupIndex=6 log4j.appender.SP.layout=org.apache.log4j.PatternLayout log4j.appender.SP.layout.ConversionPattern=%d ::%m%n I need to roll over the file on basis of both the date and Size of the file. When i run the application it gives me the compilation error: log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender. log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender. I checked the Mail list archive and there was a suggestion that one use CompositeRollingFileAppender. Where can i find CompositeRollingFileAppender? Could anyone suggest a way to implement this? Regards, Divya Shetty _ BharatMatrimony.com. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 India's premium matrimonial website. - 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]
Unexpected logger ancestor
Hi all, I am using log4j 1.2.8 which I have congifured using the XML configuration. I have defined four category entires in my log file and I have now encountered some unexpected (for me at least) behaviour. The loggers are configured as follows: category name=X priority value=debug / /category category name=Y priority value=debug / /category category name=X.Z priority value=debug / /category category name=Y.Z priority value=debug / /category root priority value=INFO/ appender-ref ref=MyFile/ /root I have turned the log4j debug output on and it seems that the X and Y and X.Z categories are being created correctly. However according to the debug output the Y.Z logger is not being created as Y.Z but as X.Y.Z. I can only guess that because X is defined as the parent logger of Z in Category X.Z that log4j is automatically expanding the Y.Z to X.Z because it already thinks that X is an ancestor of X. Is this the way log4j works and if so why? Can I not define my loggers using the names I have defined above? Tom _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons.logging and log4j configureAndWatch
commons.logging and log4j configureAndWatch Hello The application I work on currently uses the log4j configureAndWatch facility which allows the logging level to be dynamically modified without restarting the application. I am now evaluating whether we can move to the commons.logging framework as a wrapper to log4j. The answer is yes - but I cannot see how to dynamically modify the logging level. I was hoping there would be a facility within the log4j.properties file, such as log4j.PropertyConfigurator.configureAndWatch=true, but I may be searching in vain. Any help will be gratefully received. Thanks ! == Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: commons.logging and log4j configureAndWatch
Hi Martin, There is no such functionality available in v1.2.X. We are working on this functionality for v1.3 (Watchdogs). For now, you would need to write your own log4j specific code, outside of the common-logging framework. hth, -Mark -Original Message- From: Martin Flower [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 10:14 AM To: [EMAIL PROTECTED] Subject: commons.logging and log4j configureAndWatch commons.logging and log4j configureAndWatch Hello The application I work on currently uses the log4j configureAndWatch facility which allows the logging level to be dynamically modified without restarting the application. I am now evaluating whether we can move to the commons.logging framework as a wrapper to log4j. The answer is yes - but I cannot see how to dynamically modify the logging level. I was hoping there would be a facility within the log4j.properties file, such as log4j.PropertyConfigurator.configureAndWatch=true, but I may be searching in vain. Any help will be gratefully received. Thanks ! == Martin - 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]
Re: AW: DailyRollingFileAppender with filesize option
Hi Carsten, It is my understanding, and I may be wrong here, that Ceki has completely rewritten the whole rolling appender framework to allow much more flexibility in the composition of different rules for rolling. This unfortunately not in the released version at this time, but the 1.3 release is not that far away. We appreciate your contribution, perhaps you could attach the files to a bug item (if you haven't done so already), so that your efforts don't get lost if my understanding is not correct. cheers, Paul Smith On Mon, 2003-12-01 at 20:57, Bansemir, Carsten wrote: Hi, some time ago i wrote the following to the log4j-dev mailing list: Hi, I had several problems with the DailyRollingFileAppender (see user mailing list), so I downloaded the DailyRollingAppenderExt.jar but I can't find the source of this file again (so I also can't find out the author of this Class). I extended this class so that the Appender rolls by date AND by size, like the CompositeRollingFileAppender does, with the difference that it logs to a different file every day, without having to rename any files (that was the problem with threads logging to yesterday's dir because the Java method renameTo() fails in the RollingFileAppender or the CompositeRollingFileAppender. My question is: Are you interested in this Appender? and if so, do you know who the original author of DailyRollingFileAppenderExt was? I would like to give this appender out to the people searching for something like that in the mailing list, it's almost an FAQ, but I would like to ask the original author before. So if someone finds out the the author of the original DailyRollingFileAppenderExt please tell me, that I can give out the modified one to the people who want it. -Ursprngliche Nachricht- Von: Manju Joseph [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 30. November 2003 03:08 An: [EMAIL PROTECTED] Betreff: Fwd: DailyRollingFileAppender with filesize option Hello.., Me too getting the same error.Can any one help MANJU From: Divya Shetty [EMAIL PROTECTED] Reply-To: Log4J Users List [EMAIL PROTECTED] To: Log4J Users List [EMAIL PROTECTED] Subject: DailyRollingFileAppender with filesize option Date: Sat, 29 Nov 2003 14:30:46 +0530 In the CompositeRollingAppender, the reference made to setFile provides a String and boolean as parameter while the setFile in FileAppender which accepts two arguments expects Layout and Boolean. Hence am unable to compile ti.. None in our project has used log4J before and the lack of time is causing to be a deterent in workign it out for ourselves. Would it be possible to either download the CompositeRollingAppender.class or the jar which has been updated with the CompositeRollingAppender.class ? - Original Message - From: Divya Shetty To: Log4J Users List Sent: Saturday, November 29, 2003 1:32 PM Subject: Fw: DailyRollingFileAppender with filesize option I downloaded log4j-1.2.8.jar. Along with this i found the CompositeRollingAppender.java in the contributions folder. In this file, on line 362 the method super.setFile(fileName, append) is called. In the FileAppender, there is no overloaded method where only two arguments are provided and hence it fails in the compilation. Is this a known issue or has someone already resolved it? Thanks Divya - Original Message - From: Divya Shetty To: Log4J Users List Sent: Saturday, November 29, 2003 11:00 AM Subject: DailyRollingFileAppender with filesize option Hi, I have the following log4j property file: log4j.rootLogger=debug, A log4j.logger.SickPay=debug, SP log4j.appender.SP=org.apache.log4j.DailyRollingFileAppender log4j.appender.SP.File=COMMON~1\\Trial\\SP.log log4j.appender.SP.MaxFileSize=1KB log4j.appender.SP.MaxBackupIndex=6 log4j.appender.SP.layout=org.apache.log4j.PatternLayout log4j.appender.SP.layout.ConversionPattern=%d ::%m%n I need to roll over the file on basis of both the date and Size of the file. When i run the application it gives me the compilation error: log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender. log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender. I checked the Mail list archive and there was a suggestion that one use CompositeRollingFileAppender. Where can i find CompositeRollingFileAppender? Could anyone suggest a way to implement this? Regards, Divya Shetty _ BharatMatrimony.com. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 India's premium matrimonial website. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Resolution: How stable is Chainsaw 2?
Scott, Thank you for your help. I like this version, is it possible to run it with current production version of log4j? Thanks. robert -Original Message- From: Scott Deboy [mailto:[EMAIL PROTECTED] Sent: Sunday, November 30, 2003 2:20 PM To: Log4J Users List Subject: Resolution: How stable is Chainsaw 2? FYI, For anyone interested in building log4j from source, ensure paths in build.properties use forward slashes. Scott -Original Message- From: Robert Augustyn [mailto:[EMAIL PROTECTED] Sent: Sat 11/29/2003 8:20 PM To: 'Log4J Users List' Cc: Subject:RE: How stable is Chainsaw 2? Well I did all that and I got the output you have expected ( almost ) but still no luck. Thanks for you help. Robert H:\cvs\jakarta-log4jH:\java\apache-ant-1.5.4\bin\ant chainsaw C:\j2sdk14201\bin\java.exe -classpath C:\j2sdk14201\lib\tools.jar;H:\java\ap ache-ant-1.5.4\lib\xml-apis.jar;H:\java\apache-ant-1.5.4\lib\xercesImpl. jar; H:\j ava\apache-ant-1.5.4\lib\optional.jar;H:\java\apache-ant-1.5.4\lib\ant.j ar; -D ant.home=H:\java\apache-ant-1.5.4 org.apache.tools.ant.Main chainsaw Buildfile: build.xml init: oroCheck: chainsawCheck: build.core: [mkdir] Created dir: H:\cvs\jakarta-log4j\dist\classes [javac] Compiling 199 source files to H:\cvs\jakarta-log4j\dist\classes [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. build.chainsaw: build.lf5: [javac] Compiling 44 source files to H:\cvs\jakarta-log4j\dist\classes [javac] Note: H:\cvs\jakarta-log4j\src\java\org\apache\log4j\lf5\viewer\LogB rokerMonitor.java uses or overrides a deprecated API. [javac] Note: Recompile with -deprecation for details. [copy] Copying 3 files to H:\cvs\jakarta-log4j\dist\classes build.examples: [mkdir] Created dir: H:\cvs\jakarta-log4j\examples\classes [javac] Compiling 12 source files to H:\cvs\jakarta-log4j\examples\classes [rmic] RMI Compiling 1 class to H:\cvs\jakarta-log4j\examples\classes jaxpCheck: jaxp: [echo] JAXP present. build.xml: [javac] Compiling 7 source files to H:\cvs\jakarta-log4j\dist\classes [copy] Copying 1 file to H:\cvs\jakarta-log4j\dist\classes\org\apache\log4j \xml [copy] Copying 1 file to H:\cvs\jakarta-log4j\dist\classes\org\apache\log4j \xml javamailCheck: javamail: build.javamail: jmsCheck: jms: jndiCheck: jndi: [echo] JNDI is present. build.jms: jmxCheck: jmx: build.jmx: avalonFrameworkCheck: avalonFramework: build.avalonFramework: build: log4j.jar: [delete] Deleting 1 files from H:\cvs\jakarta-log4j [jar] Building jar: H:\cvs\jakarta-log4j\log4j-1.3alpha.jar log4j-chainsaw.jar: [delete] Deleting 1 files from H:\cvs\jakarta-log4j [copy] Copying 71 files to H:\cvs\jakarta-log4j\dist\classes [jar] Building jar: H:\cvs\jakarta-log4j\log4j-chainsaw-1.3alpha.jar chainsaw: [java] java.lang.NoClassDefFoundError: org/apache/log4j/chainsaw/LogUI [java] Exception in thread main [java] Java Result: 1 BUILD SUCCESSFUL Total time: 15 seconds H:\cvs\jakarta-log4j -Original Message- From: Scott Deboy [mailto:[EMAIL PROTECTED] Sent: Saturday, November 29, 2003 3:18 PM To: Log4J Users List Subject: RE: How stable is Chainsaw 2? [EMAIL PROTECTED] I think JDeveloper may be the culprit. Can you run it outside JDeveloper? (with no extra classes in the classpath except ant)? prerequisites: cvs, ant (a recent version, 1.5.1 or newer?), jdk 1.3 or greater 1: pull the tip of the jakarta-log4j cvs module (see http://jakarta.apache.org/site/cvsindex.html ) 2: download the latest ORO release and expand (see http://jakarta.apache.org/site/binindex.cgi ) 3: in the jakarta-log4j directory, copy build.properties.sample to build.properties 4: uncomment the ORO path line in build.properties and update the path - example: regexp.oro.jar=c:/downloads/oro/jakarta-oro-2.0.7/jakarta-oro-2.0.7.jar 5: in the jakarta-log4j directory, run the chainsaw ant target ('ant chainsaw') Here are the first lines I get when I run the build...yours should look similar: Buildfile: build.xml oroCheck: chainsawCheck: [echo] Chainsaw dependant libraries present. chainsawRunCheck: init: build.core: [mkdir] Created dir: D:\temp\jakarta-log4j\dist\classes [javac] Compiling 199 source files to D:\temp\jakarta-log4j\dist\classes [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. build.chainsaw: [javac] Compiling 108 source files to D:\temp\jakarta-log4j\dist\classes -Original Message- From: Robert Augustyn [mailto:[EMAIL PROTECTED] Sent: Sat 11/29/2003 4:20 AM To: 'Log4J Users List' Cc: Subject:RE: How stable is Chainsaw 2? Paul, I do get log4j-chainsaw-1.3alpha.jar in the directory but the jar does not have any of the classes. I am using jdk 1.4.1_02. And run it from the jdeveloper. I