You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Javier <xl...@yahoo.com> on 2004/11/11 15:43:33 UTC

Can�t write logs

Hello

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.
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=apliA.log
log4j.appender.A1.maxFileSize=1MB
log4j.appender.A1.maxBackupIndex=3

# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%p %t %c -
%m%n

# stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line
number.
log4j.appender.stdout.layout.ConversionPattern=%5p
[%t] (%F:%L) - %m%n
------------

and in my code I did:

 PropertyConfigurator pcconfig = new
PropertyConfigurator();
        pcconfig.configure("aprop.properties");

        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

Javier

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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