• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.logging -- rollover logs?  RSS feed

 
Keith Lockey
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am writing exceptions to logs. Now, I am trying to find classes in the JDK to rollover the logs when they reach a 2mb maximum.
Thanks,
Keith
 
Angel Dobbs-Sciortino
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File.length() returns the length of the file in bytes as a long. You could do a check for the length and then rollover the log once it exceeds 2mb.
Angel
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!