File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes seperate log files based on a unique identifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "seperate log files based on a unique identifier" Watch "seperate log files based on a unique identifier" New topic
Author

seperate log files based on a unique identifier

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
Would you guys happen to know how I can configure log4J to write to different log files which will contain a unique identifier(not a date) that is present within the code block during the time of writing?
xsunil kumar
Ranch Hand

Joined: Dec 14, 2009
Posts: 133
Ronnie,

You can write log files in what ever manner you want. You can append unique identifier also in log file name. What you need to do is to write custom file appender. You need to define that custom file appender class name in the log4j.xml file. In this way you can get whatever you want.

Search on google, you will get samples how to write custom file appender for log4j.

Regards,
Sunil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: seperate log files based on a unique identifier