logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lionel SMETS <tsm...@altern.org>
Subject Re: Logging from same class to 2 different log files and each configu red with its own level
Date Fri, 04 Apr 2003 00:27:31 GMT
Unless you really want to manually process the file...
Smthg like :
    cat app.log | grep INFO >  cumul.log

I think you are better to use to different loggers.
Naming them should take into consideration why you want to make this 
We push ALL the SQL's  going tru' a sort of SQL-pooler to a special 
'sql.log', but I created a special entry in the hierarchy to have that:
    Logger log = Logger.getLogger (this.getName ().getClass ());
    Logger sql = Logger.getLogger (this.getName ().getClass () + ".sql");


De Moor Dries wrote:

>In the application I'm writing I need to log 2 things. 
>First of all information to a log file called app.log ( ERROR, DEBUG, INFO,
>... )
>Secondly I have to log some information into a file cumul.log  ( only INFO)
>I thought to  define 2 separate property files bu I think this won't work.
>I might be better to define two appenders but how to set the log levels. 
>And how to prevent that ERROR, DEBUG INFO log messages end up in the
>CUMUL.log file.
>Any advice on this topic. Maybe I'm totally wrong?
>Kind regards,
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

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

View raw message