Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generating dynamic log file with dynamic file name

 
Abhishek Mish
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the dynamic file name based on? System properties?
 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic