Skip to content

Instantly share code, notes, and snippets.

@autre
Created September 6, 2016 19:37
Show Gist options
  • Save autre/d9a7b2a4f756218f2633054354f7ec98 to your computer and use it in GitHub Desktop.
Save autre/d9a7b2a4f756218f2633054354f7ec98 to your computer and use it in GitHub Desktop.
com.acme.app.handlers = java.util.logging.FileHandler
com.acme.app.level = ALL
com.acme.app.useParentHandlers = false
java.util.logging.FileHandler.pattern = app.log
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format = %4$-5s [%1$tY-%1$tm-%1$tdT%1$tH:%1$TM:%1$TS,%1$TL%1$Tz] %2$10s: %5$s%6$s%n
@autre
Copy link
Author

autre commented Sep 6, 2016

And then, you have to tell the jvm where to find it: java -Djava.util.logging.config.file=logging.properties -jar app.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment