473,378 Members | 1,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Log4j-multiple log files

40
Hai All,
I would like to use multiple appender in my application.i.e, i want to write info messages to one log file ,while i want to write error messages to other file.
Im using xml file, with dailyfileappender class.I would also like to know how can i clear the log files after a certain period.

Thanks in advance.
Feb 3 '09 #1
1 4330
umbr
9
Hi, crs27.
With DailyFileAppender you can clear log files, after a certain period, manually or by scheduler(i.e. cron).
Feb 14 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Aaron Boxer | last post by:
Hello, My application is using a jar file MyJar.jar that uses log4j (I have the latest release of log4j). I have put both MyJar.jar and log4j.jar in a directory in my classpath. I have also...
2
by: Greg Scharlemann | last post by:
I have a various different packages within this web application that I am writing and I am attempting to set up log4j to log directly to a database. So each class is calling just a generic logger:...
4
by: Jan van Mansum | last post by:
Hello group, I have just been trying out the log4j library. As far as I understand the idea is to keep the logging statements in your, even in the release build. However, obviously you wouldn't...
2
by: BobReynolds | last post by:
We use Log4j for all our logging, I want to know why we have to do the following in EVERY class final private static org.apache.log4j.Logger log = LoggerUtil.getLogger(thisClassName.class); ...
0
by: sainiranji | last post by:
Hi All I have diffrent categories in diffrrent logging purpose and all are working fine...but now my requirment is to disable all at once . The below are change i did for disable all logges...
0
by: Hari2349 | last post by:
Hai, friends i used the log4j.properties file like as below...... log4j.rootLogger=VERBOSE, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender ...
2
by: Hari2349 | last post by:
Regarding to log4j in java program..Plz help me... -------------------------------------------------------------------------------- Hai, friends i used the log4j.properties file like as...
0
by: Mikhail Teterin | last post by:
Hello! I'm trying to use log4j's SMTPAppender to get warnings and errors reported by our application via e-mail (in addition to having ALL messages saved into a file via RollingFileAppender). ...
0
by: msg2ajay | last post by:
hello, I have configured %CATALINA_HOME% in Win Environ.But as I configured to "${catalina.home}/MQLog/info/info.log" for "file" in log4j.xml I can't see the log file after running my...
5
by: Abhinay | last post by:
Hi there, I am working on server which used thread pool to process each client request by separate dedicated thread. My intention was each thread ( of thread pool ) have its own logger and hence...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.