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 Sravan Duggaraju <sa...@gmail.com> on 2005/12/20 22:27:26 UTC

Log4j Messages into different files based on diffent Levels

Hi,
Using log4j  can we log different level msgs (like
DEBUG,ERROR,INFO etc) in separate file appenders?
For example, all the 'INFO' messages go to AuditLog.
'ERROR' messages would go to ErrorLog ..
Please let me know if any option is avaialble to perform this.

I appreciate if you can send the properties/xml file and how
you accessed it form the application.

Thanks
Sandi

Re: Log4j Messages into different files based on diffent Levels

Posted by Sravan Duggaraju <sa...@gmail.com>.
 I have gone through the document and tried to implement it...but the
messages are showing in all files.

My requrement is  information related messages should go to AuditLog and
Error messages should go to ErrorLog.

i was setting the messages like
 logger.info("this is info message");
logger.error("this is error message");




On 12/20/05, Sravan Duggaraju <sa...@gmail.com> wrote:
>
> Hi,
> Using log4j  can we log different level msgs (like
> DEBUG,ERROR,INFO etc) in separate file appenders?
> For example, all the 'INFO' messages go to AuditLog.
> 'ERROR' messages would go to ErrorLog ..
> Please let me know if any option is avaialble to perform this.
>
> I appreciate if you can send the properties/xml file and how
> you accessed it form the application.
>
> Thanks
> Sandi
>

Re: Log4j Messages into different files based on diffent Levels

Posted by Sravan Duggaraju <sa...@gmail.com>.
I have gone through the document and tried to implement it...but the
messages are showing in all files.

My requrement is  information related messages should go to AuditLog and
Error messages should go to ErrorLog.

i was setting the messages like
 logger.info("this is info message");
logger.error("this is error message");



Thanks
Sandi



On 12/20/05, James Stauffer <st...@gmail.com> wrote:
>
> That is easy to do.  The documentation should explain how to do that.
> Look into appender thresholds and level filters.
>
> On 12/20/05, Sravan Duggaraju <sa...@gmail.com> wrote:
> > Hi,
> > Using log4j  can we log different level msgs (like
> > DEBUG,ERROR,INFO etc) in separate file appenders?
> > For example, all the 'INFO' messages go to AuditLog.
> > 'ERROR' messages would go to ErrorLog ..
> > Please let me know if any option is avaialble to perform this.
> >
> > I appreciate if you can send the properties/xml file and how
> > you accessed it form the application.
> >
> > Thanks
> > Sandi
> >
> >
>
>
> --
> James Stauffer
> 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
>
>

Re: Log4j Messages into different files based on diffent Levels

Posted by James Stauffer <st...@gmail.com>.
That is easy to do.  The documentation should explain how to do that. 
Look into appender thresholds and level filters.

On 12/20/05, Sravan Duggaraju <sa...@gmail.com> wrote:
> Hi,
> Using log4j  can we log different level msgs (like
> DEBUG,ERROR,INFO etc) in separate file appenders?
> For example, all the 'INFO' messages go to AuditLog.
> 'ERROR' messages would go to ErrorLog ..
> Please let me know if any option is avaialble to perform this.
>
> I appreciate if you can send the properties/xml file and how
> you accessed it form the application.
>
> Thanks
> Sandi
>
>


--
James Stauffer
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