• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j - Is the log file to be present when the application started?

 
Makesh Kumar Ramakrishnan
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file path is mentioned in the log4j property file.

If the particular directory is not available, log4j is throwing FileNotFound Exception. So, Is there anyway log4j automatically creates the directory path when the mentioned path is not available?.

Thanks,

Makesh
[ July 16, 2008: Message edited by: Makesh Kumar Ramakrishnan ]
 
Paul Clapham
Sheriff
Pie
Posts: 20979
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, as you can see, it doesn't. You could check the documentation for that appender but I doubt you will find any method to specify "Create the directory if it doesn't exist".

However it shouldn't take more than a couple of minutes to create the directory. I would just do that rather than hunting down the docs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic