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 legolas <le...@gmail.com> on 2007/01/08 21:27:27 UTC

my log4j properties file does not configure the logger properly.

Hi
Thank you for  reading my post.

I have a log4j.proeprties file in my /src directory, and its content is :
[code]
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.FileAppender
log4j.appender.stdout.File=messages.log
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
%m%n

# Root logger option
log4j.rootLogger=WARN, stdout

#Hibernate logging options (INFO only shows startup messages)
log4j.logger.org.hibernate=INFO

# Log JDBC bind parameter runtime arguments
log4j.logger.org.hibernate.type=DEBUG
[/code]

inside my codes i have something like :

[code]
         Logger logger = Logger.getRootLogger();
        logger.info("This is legolas version of a log");
        logger.info("parent ID:"+parent.getId());
        logger.info("Child ID got from
parent:"+parent.getNextMessage().getId());
[/code]

what should i do that i log my messages into the file that i configured in
log4j.properties file.

thanks
-- 
View this message in context: http://www.nabble.com/my-log4j-properties-file-does-not-configure-the-logger-properly.-tf2941833.html#a8225805
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: my log4j properties file does not configure the logger properly.

Posted by James Stauffer <st...@gmail.com>.
Look at the "Configuration" section of
http://logging.apache.org/log4j/docs/manual.html

On 1/8/07, legolas <le...@gmail.com> wrote:
>
> Hi
> Thank you for  reading my post.
>
> I have a log4j.proeprties file in my /src directory, and its content is :
> [code]
> # Direct log messages to stdout
> log4j.appender.stdout=org.apache.log4j.FileAppender
> log4j.appender.stdout.File=messages.log
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
> %m%n
>
> # Root logger option
> log4j.rootLogger=WARN, stdout
>
> #Hibernate logging options (INFO only shows startup messages)
> log4j.logger.org.hibernate=INFO
>
> # Log JDBC bind parameter runtime arguments
> log4j.logger.org.hibernate.type=DEBUG
> [/code]
>
> inside my codes i have something like :
>
> [code]
>          Logger logger = Logger.getRootLogger();
>         logger.info("This is legolas version of a log");
>         logger.info("parent ID:"+parent.getId());
>         logger.info("Child ID got from
> parent:"+parent.getNextMessage().getId());
> [/code]
>
> what should i do that i log my messages into the file that i configured in
> log4j.properties file.
>
> thanks
> --
> View this message in context: http://www.nabble.com/my-log4j-properties-file-does-not-configure-the-logger-properly.-tf2941833.html#a8225805
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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