File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Joined: Sep 01, 2003
Apr 07, 2005 01:06:00
I am introducing log4j in my application and succeeded to do so. But now I want to saperate the log in different file according to their LEVEL i.e.
debug log should go in debug.log file and
warn log should go in warn.log file and
similarly other error and info and fatal.
Please help me in the regard.
Thank You & Best Regards,
Senior Software Engineer
SAP Oracle AIX & Java Training
Joined: Aug 31, 2004
Apr 10, 2005 09:18:00
Create 3 file appenders in your log4j config file.
Then you can set the appender you want to use. Example:
private static final Logger LOG = Logger.getLogger("warnAppender");
LOG.warn("An exception was thrown");
I agree. Here's the link:
subject: Log4j Property
error when i run log file
Not able to save logs into .log file
Deploy Java Web Application on Linux Environment using JBoss Application Server
Can Log4j read two properties?
Create user wise Log file.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014