All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.azolla.l.ling.2.0.2.source-code.log4j.properties Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
# Azolla log4j config templates

# Level : TRACE->DEBUG->INFO->WARN->ERROR->FATAL

# log4j.debug : Defining this value makes log4j print log4j-internal debug statements to System.out.
# log4j.configDebug : [log4j.configDebug] is deprecated. Use [log4j.debug] instead.

# log4j.reset : if log4j.reset=true then reset hierarchy

# log4j.threshold : Level (Perhaps more advanced usage)

# log4j.rootLogger : Level, appender ...
# log4j.rootCategory : bad used, use [log4j.rootLogger]

# %p: \u8f93\u51fa\u65e5\u5fd7\u4fe1\u606f\u4f18\u5148\u7ea7\uff0c\u5373DEBUG\uff0cINFO\uff0cWARN\uff0cERROR\uff0cFATAL,
# %d: \u8f93\u51fa\u65e5\u5fd7\u65f6\u95f4\u70b9\u7684\u65e5\u671f\u6216\u65f6\u95f4\uff0c\u9ed8\u8ba4\u683c\u5f0f\u4e3aISO8601\uff0c\u4e5f\u53ef\u4ee5\u5728\u5176\u540e\u6307\u5b9a\u683c\u5f0f\uff0c\u6bd4\u5982\uff1a%d{yyy MMM dd HH:mm:ss,SSS}\uff0c\u8f93\u51fa\u7c7b\u4f3c\uff1a2002\u5e7410\u670818\u65e5 22\uff1a10\uff1a28\uff0c921
# %r: \u8f93\u51fa\u81ea\u5e94\u7528\u542f\u52a8\u5230\u8f93\u51fa\u8be5log\u4fe1\u606f\u8017\u8d39\u7684\u6beb\u79d2\u6570
# %c: \u8f93\u51fa\u65e5\u5fd7\u4fe1\u606f\u6240\u5c5e\u7684\u7c7b\u76ee\uff0c\u901a\u5e38\u5c31\u662f\u6240\u5728\u7c7b\u7684\u5168\u540d
# %t: \u8f93\u51fa\u4ea7\u751f\u8be5\u65e5\u5fd7\u4e8b\u4ef6\u7684\u7ebf\u7a0b\u540d
# %l: \u8f93\u51fa\u65e5\u5fd7\u4e8b\u4ef6\u7684\u53d1\u751f\u4f4d\u7f6e\uff0c\u76f8\u5f53\u4e8e%C.%M(%F:%L)\u7684\u7ec4\u5408,\u5305\u62ec\u7c7b\u76ee\u540d\u3001\u53d1\u751f\u7684\u7ebf\u7a0b\uff0c\u4ee5\u53ca\u5728\u4ee3\u7801\u4e2d\u7684\u884c\u6570\u3002\u4e3e\u4f8b\uff1aTestlog4.main(TestLog4.java:10)
# %x: \u8f93\u51fa\u548c\u5f53\u524d\u7ebf\u7a0b\u76f8\u5173\u8054\u7684NDC(\u5d4c\u5957\u8bca\u65ad\u73af\u5883),\u5c24\u5176\u7528\u5230\u50cfjava servlets\u8fd9\u6837\u7684\u591a\u5ba2\u6237\u591a\u7ebf\u7a0b\u7684\u5e94\u7528\u4e2d\u3002
# %%: \u8f93\u51fa\u4e00\u4e2a"%"\u5b57\u7b26
# %F: \u8f93\u51fa\u65e5\u5fd7\u6d88\u606f\u4ea7\u751f\u65f6\u6240\u5728\u7684\u6587\u4ef6\u540d\u79f0
# %L: \u8f93\u51fa\u4ee3\u7801\u4e2d\u7684\u884c\u53f7
# %m: \u8f93\u51fa\u4ee3\u7801\u4e2d\u6307\u5b9a\u7684\u6d88\u606f,\u4ea7\u751f\u7684\u65e5\u5fd7\u5177\u4f53\u4fe1\u606f
# %n: \u8f93\u51fa\u4e00\u4e2a\u56de\u8f66\u6362\u884c\u7b26\uff0cWindows\u5e73\u53f0\u4e3a"\r\n"\uff0cUnix\u5e73\u53f0\u4e3a"\n"\u8f93\u51fa\u65e5\u5fd7\u4fe1\u606f\u6362\u884c
# \u53ef\u4ee5\u5728%\u4e0e\u6a21\u5f0f\u5b57\u7b26\u4e4b\u95f4\u52a0\u4e0a\u4fee\u9970\u7b26\u6765\u63a7\u5236\u5176\u6700\u5c0f\u5bbd\u5ea6\u3001\u6700\u5927\u5bbd\u5ea6\u3001\u548c\u6587\u672c\u7684\u5bf9\u9f50\u65b9\u5f0f\u3002\u5982\uff1a
#   1)%20c\uff1a\u6307\u5b9a\u8f93\u51facategory\u7684\u540d\u79f0\uff0c\u6700\u5c0f\u7684\u5bbd\u5ea6\u662f20\uff0c\u5982\u679ccategory\u7684\u540d\u79f0\u5c0f\u4e8e20\u7684\u8bdd\uff0c\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0b\u53f3\u5bf9\u9f50\u3002
#   2)%-20c:\u6307\u5b9a\u8f93\u51facategory\u7684\u540d\u79f0\uff0c\u6700\u5c0f\u7684\u5bbd\u5ea6\u662f20\uff0c\u5982\u679ccategory\u7684\u540d\u79f0\u5c0f\u4e8e20\u7684\u8bdd\uff0c"-"\u53f7\u6307\u5b9a\u5de6\u5bf9\u9f50\u3002
#   3)%.30c:\u6307\u5b9a\u8f93\u51facategory\u7684\u540d\u79f0\uff0c\u6700\u5927\u7684\u5bbd\u5ea6\u662f30\uff0c\u5982\u679ccategory\u7684\u540d\u79f0\u5927\u4e8e30\u7684\u8bdd\uff0c\u5c31\u4f1a\u5c06\u5de6\u8fb9\u591a\u51fa\u7684\u5b57\u7b26\u622a\u6389\uff0c\u4f46\u5c0f\u4e8e30\u7684\u8bdd\u4e5f\u4e0d\u4f1a\u6709\u7a7a\u683c\u3002
#   4)%20.30c:\u5982\u679ccategory\u7684\u540d\u79f0\u5c0f\u4e8e20\u5c31\u8865\u7a7a\u683c\uff0c\u5e76\u4e14\u53f3\u5bf9\u9f50\uff0c\u5982\u679c\u5176\u540d\u79f0\u957f\u4e8e30\u5b57\u7b26\uff0c\u5c31\u4ece\u5de6\u8fb9\u4ea4\u8fdc\u9500\u51fa\u7684\u5b57\u7b26\u622a\u6389\u3002

# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE
log4j.rootCategory=INFO, CONSOLE, LOGFILEDAY

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
log4j.appender.CONSOLE.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p %l %x - %m%n

# LOGFILE is set to be a FileAppender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=${user.home}/Azolla.org/logs/org.azolla.l.ling.log
log4j.appender.LOGFILE.Append=true
#log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p %l %x - %m%n

# LOGFILEDAY is set to be a DailyRollingFileAppender using a PatternLayout.
log4j.appender.LOGFILEDAY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LOGFILEDAY.File=${user.home}/Azolla.org/logs/org.azolla.l.ling.log
log4j.appender.LOGFILEDAY.DatePattern='.'yyyy-MM-dd
log4j.appender.LOGFILEDAY.Append=true
#log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILEDAY.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILEDAY.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss,SSS}] [%t] %-5p %l %x - %m%n




© 2015 - 2024 Weber Informatics LLC | Privacy Policy