logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lutz Michael <michael.h.l...@siemens.com>
Subject RE: Can4t write logs
Date Thu, 11 Nov 2004 14:58:05 GMT

One thing that's "unusual" - using the root logger.  It's generally
recommended to use the getLogger method and name your loggers with the class
FQCN, else you lose much of the power of Log4j (see

Q: did you see the console output, and did you not see the output in the
file or did you not find the file?

-----Original Message-----
From: Javier [mailto:xleyba@yahoo.com]
Sent: Thursday, November 11, 2004 9:44 AM
To: log4j-user@logging.apache.org
Subject: Can4t write logs


I?m using log4j by the first time.

I did the following properties file:

# Set root logger level to DEBUG and its only appender
to A1.
log4j.rootLogger=INFO, stdout, A1

# A1 is set to be a ConsoleAppender.

# A1 uses PatternLayout.
log4j.appender.A1.layout.ConversionPattern=%p %t %c -

# stdout

# Pattern to output the caller's file name and line
[%t] (%F:%L) - %m%n

and in my code I did:

 PropertyConfigurator pcconfig = new

        logger = Logger.getRootLogger();
        logger.info("Entering application.");

but when I run the application, I saw "entering
aplication" was not wrote in log file...

What am I doing wrong ?

Thanks in advance


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to Central.SecurityOffice@shs.siemens.com 

Thank you

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message