This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Java Logging API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Logging API" Watch "Java Logging API" New topic

Java Logging API

Mike Cutter
Ranch Hand

Joined: Jun 09, 2002
Posts: 49
My company purchased this product called the Versata Logic Server. Its manual says that its logging is based on Sun's java.util.logging package.

The logging is set to the default of the WARNING level, 1 log file, and about 1 MB in size.

I want to have the log file reach 3 MB in size and keep the 10 previous log files. When the log file reaches 3 MB in size, it copies it and starts a new log file.

I am not too familiar with the Java Logging API. Any suggestions would help me.


Joe Ess

Joined: Oct 29, 2001
Posts: 8718

Have a look at this Java Logging Overview. The java.util.logging.FileHandler class has all the settings you require, if that's what your server is using.
Logging configurations can take many forms, though most applications use a property file. Consult your product's documentation to see how it is configured.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Java Logging API
Similar Threads
Java util Logging : FileHandler
Log4j - What does it stands for?
JDK Logging API :- File rotation and .lck file issue
Java logging
NX: Notes on a design that passed 389/400