Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Log file created for every invocation  RSS feed

 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to write a simple program to log the application data using Java logging API.As we are using Java 1.2 ,i am using LumberJack for logging.


The problem is everytime i run the class a new log file is created like filename.log.0,filename.log.1 and so on.

How do i avoid this?Also i would like to know how to rollover the old log file and create a new log file everyday?I know we could do it in Log4j using org.apache.log4j.DailyRollingFileAppender but how would i get the same thing here also?

This class runs only if there is logging.properties file is in the jdre/lib folder which JDK1.2 doen't have.So i manually create a empty file with such a name under the lib directory.How do i make the jvm look for the location i specified in the program instead of lib directory?

Please find below the code and property file.




Please help
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!