| 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: 1348
|
|
|
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/
|
 |
 |
|
|
subject: Generating dynamic log file with dynamic file name
|
|
|