aspose file tools*
The moose likes Other Open Source Projects and the fly likes Generating dynamic log file with dynamic file name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Generating dynamic log file with dynamic file name" Watch "Generating dynamic log file with dynamic file name" New topic
Author

Generating dynamic log file with dynamic file name

Abhishek Mish
Greenhorn

Joined: Dec 21, 2007
Posts: 29
Hi All,
I need to generate the log file every time with dynamic log file name.
As per my understanding it cannot be done from log4.properties as the name of the file is constant which is defined in the properties file.
In that case i need to write the custom File appender which generates the log file with dynamic name.
Let me know if there is any other good way of doing and also provide me with some good sample example.

Thanks,
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
What is the dynamic file name based on? System properties?
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Hi Abhishek,

If you want to add timestamp with the log file name then
follow this.

Its been alraedy given by Carol.

Thanks Carol for giving such a useful link.


Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating dynamic log file with dynamic file name