You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Veluri, Naveen" <na...@tgslc.org> on 2001/02/19 21:36:53 UTC

Regarding Log File size and logging different messages to differe nt appenders.

Hi,
 I was looking on the log4j API and wanted help on two questions.

Regarding logging the messages after reading from an XML file :
1. how can we restrict the number of messages we can log and can we format
messages to a new file after some limit to the existing log file or is there
a better way performance wise.

2. Also i want to log different messages to different Appenders. For example
say 3 appenders - console, file and NTEventLog and I wanna log debug and
info to console, info and warning to file and Error and fatal messages to
NTEventLog then how do we organise these things with XML file and also with
source.
Can I get answers to these questions with examples please if possible.I
would really appreciate your help.

Thanking You,
 Yours Sincerely,
Naveen Veluri.
 TGSLC.


Re: Regarding Log File size and logging different messages to differe nt appenders.

Posted by Ceki Gülcü <cg...@qos.ch>.
At 14:36 19.02.2001 -0600, you wrote:
>Hi,
> I was looking on the log4j API and wanted help on two questions.
>
>Regarding logging the messages after reading from an XML file :
>1. how can we restrict the number of messages we can log and can we format
>messages to a new file after some limit to the existing log file or is there
>a better way performance wise.

Have you looked at the RollingFileAppender?


>2. Also i want to log different messages to different Appenders. For example
>say 3 appenders - console, file and NTEventLog and I wanna log debug and
>info to console, info and warning to file and Error and fatal messages to
>NTEventLog then how do we organise these things with XML file and also with
>source.

Poke around the distribution as it contains many examples configuration files in XML. Regards, Ceki 

ps: log4-dev was the wrong mailing list to place your request.



----
Ceki Gülcü          Web:   http://qos.ch      
av. de Rumine 5     email: cgu@qos.ch (preferred)
CH-1005 Lausanne           ceki_gulcu@yahoo.com
Switzerland         Tel: ++41 21 351 23 15