Sign in to follow this  
Devily

How to create multiple server.log files?

Recommended Posts

Hi i tried editing logging.properties but every time when server crashes it resets the log file.

i tried changing count to 10 but there will be no server.log anymore...

 

any one can help?

 

handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
.level=INFO

java.util.logging.FileHandler.pattern = server.log
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

java.util.logging.SimpleFormatter.format=[%1$tr] %4$s %3$s: %5$s%6$s%n

Share this post


Link to post
Share on other sites

You could add

java.util.logging.FileHandler.append=true

to your logging.properties.

 

This way new logs will be appended to the file instead of overwriting it

Share this post


Link to post
Share on other sites
On 5/28/2019 at 11:28 PM, Henry said:

You could add


java.util.logging.FileHandler.append=true

to your logging.properties.

 

This way new logs will be appended to the file instead of overwriting it

will try thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this