Skip to content

Instantly share code, notes, and snippets.

@tangblack
Created September 4, 2014 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tangblack/8908b3c8cedaaf5c9eae to your computer and use it in GitHub Desktop.
Save tangblack/8908b3c8cedaaf5c9eae to your computer and use it in GitHub Desktop.
#https://www.packtpub.com/books/content/introduction-logging-tomcat-7
#http://tomcat.apache.org/tomcat-7.0-doc/logging.html
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler # 有 File 和 Console 兩個 Handler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
org.apache.juli.FileHandler.level = INFO
org.apache.juli.FileHandler.directory = ${catalina.base}/logs # 產生的檔案放在 Tomcat 的 log 資料夾下
org.apache.juli.FileHandler.prefix = foo. # 檔案產生的前綴名稱,這裡就是 foo.log
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment