• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

log4j not rolling file on minutes base

 
Ranch Hand
Posts: 640
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in need to use the logging file rolling on daily basis. So to check the behaviour I wrote the log4j.properties on Minute basis, but instead of creating a new file every minute, it is appending logs to the same file. Below is the properties file.

Logs are getting generating into output.log file.
Am I doing something wrong here?
 
Sheriff
Posts: 6268
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anytime in your post that would roll the files every minute.  Am I missing it?
 
Greenhorn
Posts: 6
Chrome Fedora Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On line 6, you have "File" with a capital 'F'.

If I'm understanding the syntax of the config file (log4j.appender.<logname>.<logsetting>), I think that is causing your issue - the date pattern is being applied to the "File" logger, instead of the "file" logger.
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!