Skip to content

Instantly share code, notes, and snippets.

@akashchandwani
Last active June 2, 2020 18:23
Show Gist options
  • Save akashchandwani/421973c0ed57736947821dc064a181e9 to your computer and use it in GitHub Desktop.
Save akashchandwani/421973c0ed57736947821dc064a181e9 to your computer and use it in GitHub Desktop.
logging-demo applicaiton.properties
# Root logging level
logging.level.root=warn
# enable trace level logs for application sepcific logs
logging.group.app=com.example.demo
logging.level.app=TRACE
# Add timezone to the logs
logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS XXX
# Add userId and session to the logs
logging.pattern.level=%X{sessionId} %X{userId} %X{method} %X{request} %5p
# Add logs to a file
logging.file.name=logs/logging-demo.log
# Enable httptrace
management.endpoints.web.exposure.include=httptrace,health,info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment