Facing Synchronization issues while logging

S

singh.inderjeet

Hi All
I am using log4j for logging. I have a set of 5-6 classes putting logs
in their respective log files, not in the same file. Out of those
classes, I have two classes A and B putting logs in the same log file.
Now for both these classes I have seperate entries in the configuration
file regarding the appender(using DailyRollingFileAppender), layout,
date format etc.....but the same log file name..... It works fine
first...........but as the date changes, it is unable to change the
file name with previous date(as the format mentioned in the config
file....) and have the same file name for current date. What it does
is, it just overrites the old file content and start logging in the
same file for current day's logs......and that too the logs for two
classes are coming in wrong way........First, all the logs of class A
are getting printed and then logs for class B are getting
printed.......

Could someone please help me that what could be the problem?

Thanks & Regards
Inder Jeet Singh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top