This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Issue of printing multiple lines in log file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Issue of printing multiple lines in log file" Watch "Issue of printing multiple lines in log file" New topic
Author

Issue of printing multiple lines in log file

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,

I am using log4j to log the details. when the program is invoked first, the log is getting updated only once in log file. If the program is invoked second time, every lines mentioned in my program to print in log is getting printed 2 times. It goes on every time when i invoke the application. I have used the following code to log the details:



Please help to solve this issue.

Thanks
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Try removing appenders....

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks for your reply. I will try this
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Issue of printing multiple lines in log file
 
Similar Threads
log4j config file setup
File NOT getting closed in FileAppender
[log4j] DailyRollingFileAppender
Log4J
incrementing log details issue when calling webservice