logging checklist (more log4j best practices)

2009-01-26 Thread Julius Davies
Hi, I really liked this logging checklist by Anton Chuvakin: http://juliusdavies.ca/logging/llclc.html -- Best Logs: * Tell you exactly what happened: when, where, and how. * Suitable for manual, semi-automated, an automatated analysis. * Can be analyzed

Re: A default getLogger method

2009-01-26 Thread Curt Arnold
On Jan 26, 2009, at 4:27 PM, Brian Hawkins wrote: I've liked the log4j Logger except for two things. The first is that I have to pass my class name to the logger when I get it, for example: private static Logger myLogger = Logger.getLogger(MyClass.class); This is fine but it is prone to cu

A default getLogger method

2009-01-26 Thread Brian Hawkins
I've liked the log4j Logger except for two things. The first is that I have to pass my class name to the logger when I get it, for example: private static Logger myLogger = Logger.getLogger(MyClass.class); This is fine but it is prone to cut and paste errors. A better solution is to add the fol

Re: Backup log shows question marks (??) for Chinese language

2009-01-26 Thread Curt Arnold
On Jan 26, 2009, at 4:12 AM, Mohammed Mansoor wrote: Our application takes a backup of files selected from the folders specified by the user. The backup log is written using the Log4j (log4j-1.2.11.jar). When the backup is taken in Chinese language, the backup log is written and it shows

AW: log4j help: disabling org.apache.commons.digester.Digester logs

2009-01-26 Thread Bender Heri
In your log4j Config, define a subordinated Logger with a higher log level, e.g. INFO: To have the log statements of this class only logged at level INFO or higher Or To have the log statements of the whole package org.apache.commons log

log4j help: disabling org.apache.commons.digester.Digester logs

2009-01-26 Thread Ravi
Hi: I am trying to use log4j for the first time to perform logging. I am having one trouble. I want the java application to print some stuff within my code. But it also prints a lot of stuff related to org.apache.commons.digester.Digester in addition to my log statements [DEBUG [main] checkRequ

Backup log shows question marks (??) for Chinese language

2009-01-26 Thread Mohammed Mansoor
Our application takes a backup of files selected from the folders specified by the user. The backup log is written using the Log4j (log4j-1.2.11.jar). When the backup is taken in Chinese language, the backup log is written and it shows question marks(??) in place of the backup details. We tried u

RE: Simultaneous output at different levels

2009-01-26 Thread DOUTCH GARETH-GDO003
Excellent, thank you so much! -Original Message- From: Curt Arnold [mailto:carn...@apache.org] Sent: 23 January 2009 19:06 To: Log4J Users List Subject: Re: Simultaneous output at different levels On Jan 23, 2009, at 7:02 AM, DOUTCH GARETH-GDO003 wrote: > How can I configure a logger