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 Praveen Kumar Hasthalapuram <pr...@gmail.com> on 2005/12/29 18:17:38 UTC

Logging custom levels using log4j

Hi All,
I need to log specified particular type of messages to one log file and rest
to another log file.
For example say,  if message contains "SNMP" or "CDP" and so on, need to log
in to log1.log and
rest of the messages need to log in to log2.log
How to configure the log4j.properties to log custom levels?
Is there any provision  to create custom levels and to configure it?

I heard that we can do this with the use of Filters.

Could anyone suggest me better solution for this.

Thanks in Advance,
Praveen