Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pablohdzvizcarra/981637432260070ab1a6845643c8891e to your computer and use it in GitHub Desktop.
Save pablohdzvizcarra/981637432260070ab1a6845643c8891e to your computer and use it in GitHub Desktop.
file to config logging java
handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler
# To also add the FileHandler, use the following line instead.
# handler=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# level of all loggers and handlers
.level=INFO
# FileHandler specific props
java.util.logging.FileHandler.pattern = src/main/java/logs/main%u.log
java.util.logging.FileHandler.limit=50000
java.util.logging.FileHandler.count=1
java.util.logging.FileHandler.formatter=java.util.logging.XMLFormatter
# ConsoleHandler specific props
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter =java.util.logging.SimpleFormatter
# Example to customize the SimpleFormatter output format
# to print one-line log message like this:
# <level>: <log message> [<date/time>]
#
# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment