Re: AW: Automatically zipping and archiving logs?

2007-01-24 Thread patrick
ok, maybe like this http://www.nabble.com/file/5911/log4jCompressingAppender-src.zip log4jCompressingAppender-src.zip -- View this message in context: http://www.nabble.com/Automatically-zipping-and-archiving-logs--tf3083277.html#a8569737 Sent from the Log4j - Users mailing list archive

Re: How to use log4j (log4j.xml) and Maven and Junit??

2007-01-24 Thread Jacob Kjome
Try adding something like the following to your log4j.xml, after the existing entry... You can always create a separate appender for loggers other than "com.company.sql" instead of using the "DBUNIT.DEBUG.LOG" appender for the logger. I think the log4j.xml file is being found. You ju

AW: Automatically zipping and archiving logs?

2007-01-24 Thread Wyss Patrick
and here are the files, sorry... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

AW: AW: Automatically zipping and archiving logs?

2007-01-24 Thread Wyss Patrick
DatedRollingFileAppender => also the actual file has the date in it this seems to cause less problems under windows CompressingRollingFileAppender => zips the file after rolling CleaningCompressingRollingFileAppender => deletes all files (*ALL FILLES, not only log files!!!*) in the log director

Re: AW: Automatically zipping and archiving logs?

2007-01-24 Thread Dave Carlson
Any way you could send this to the list? I would be interested in seeing your solution. Thanks Wyss Patrick <[EMAIL PROTECTED]> wrote: > i have done that, (you can also specify a max age for the files...) however > it is not documented well. i'll send it to you directly, comments welcome ;

AW: Re: AW: Unnecessary garbage

2007-01-24 Thread Wyss Patrick
> > No, I don't think so. "some string here" is a constant. It gets > > interned. No new object gets created on each call. The String gets > > created once when the class loads. > > how much would you bet :-] > ooops i guess i was wrong here :-} apologies for opening my big mouth ;-) --

AW: Automatically zipping and archiving logs?

2007-01-24 Thread Wyss Patrick
i have done that, (you can also specify a max age for the files...) however it is not documented well. i'll send it to you directly, comments welcome ;-) cheers patrick > -Ursprüngliche Nachricht- > Von: news [mailto:[EMAIL PROTECTED] Auftrag von Chris > Gesendet: Mittwoch, 24. Januar 2

AW: Re: AW: Unnecessary garbage

2007-01-24 Thread Wyss Patrick
> Internally, I'm sure the info() method is calling Object.toString(), > which does create a new String object. you are right Layout.format will turn it into a String. smart appenders do this using StringBuffer/Builder. format could format to a StringBuffer/Builder but this does not realy matte

Automatically zipping and archiving logs?

2007-01-24 Thread Chris
Does anyone know of a way to zip log files automatically and copy them to an archive? I'm thinking that an Appender that did this would be cool. We've got an installation with a number of app servers that generate huge logs at very high speed. If we could zip a log whenever it rolled over, and

Re: AW: Unnecessary garbage

2007-01-24 Thread Chris
Wyss Patrick wrote: Why does the logger force you to use Strings? no body is forced to log *strings* have a look at the signature of Logger.info(): public void info(Object message) Internally, I'm sure the info() method is calling Object.toString(), which does create a new String object.

AW: Logger (not Appender) Filter

2007-01-24 Thread Wyss Patrick
i tought your first idea of having loggers which can be configured to filter the events was quite appealing. however i can't say if this would be a bad design idea for some architectural/performance reason(s). [actually i suspect that there is a reason why this is not done yet, mainly because yo

RE: Logger (not Appender) Filter

2007-01-24 Thread Brett Birschbach
Thank you very much for your response Ron. Funny that you should mention the multi-appender idea. I've already gone down that road. I rolled my own appender class that mimics appender-ref functionality of Ansynchronous appender, but leaves out the rest. I've tested the appender, and it works j

RE: Logger (not Appender) Filter

2007-01-24 Thread Gallagher, Ron
Brett -- I can't address the reasons for why filters aren't allowed at the logger level, but I can offer you a solution to your problem. Appenders can be nested. Simply attach an appender "A" to the logger for "com.xyz.dostuff". The configure appender "A" with the filter you've described and th

RE: How to use log4j (log4j.xml) and Maven and Junit??

2007-01-24 Thread Gallagher, Ron
Lisa -- You don't need to make any modifications to the mvn script to accomplish what you're trying to do. Here's what we do... 1) Set up a directory that will contain resource/configuration files that you want available when you run your tests. For us, we use ${basedir}/src/test/config 2) Put

AW: Unnecessary garbage

2007-01-24 Thread Wyss Patrick
> Why does the logger force you to use Strings? no body is forced to log *strings* have a look at the signature of Logger.info(): public void info(Object message) so use StringBuffers (or if using java1.5 StringBuilder) if you like to. however IMHO your code is generating unnecessary String o