#定义LOG输出源
log4j.rootLogger=DEBUG, File, Console, Sentry, Graylog2
#定义日志输出目的地为控制台,并指定具体的格式
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target=System.out
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss.SSS}][%t][%-5p][%c:%L]: %m%n
log4j.logger.org.apache.http=ERROR
log4j.logger.org.mybatis=DEBUG
log4j.logger.com.ibatis=DEBUG
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG
log4j.appender.File = org.apache.log4j.RollingFileAppender
log4j.appender.File.File = logs/echemi/echemi_out.log
log4j.appender.File.MaxFileSize = 100MB
log4j.appender.File.Threshold = DEBUG
log4j.appender.File.layout = org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern =[%d{yyyy-MM-dd HH:mm:ss.SSS}][%t][%-5p][%c:%L]: %m%n
#Sentry配置
log4j.appender.Sentry=io.sentry.log4j.SentryAppender
log4j.appender.Sentry.threshold=WARN
#Graylog配置
# Define the graylog2 destination
log4j.appender.Graylog2=org.graylog2.log.GelfAppender
#graylogHost: Graylog2 server where it will send the GELF messages; to use TCP instead of UDP, prefix with tcp:
log4j.appender.Graylog2.graylogHost=192.168.0.1
#graylogPort: Port on which the Graylog2 server is listening; default 12201 (optional)
log4j.appender.Graylog2.graylogPort=12201
#originHost: Name of the originating host; defaults to the local hostname (optional)
#log4j.appender.Graylog2.originHost=hostname
#extractStacktrace (true/false): Add stacktraces to the GELF message; default false (optional)
log4j.appender.Graylog2.extractStacktrace=true
#addExtendedInformation (true/false): Add extended information like Log4j's NDC/MDC; default false (optional)
log4j.appender.Graylog2.addExtendedInformation=true
#facility: Facility which to use in the GELF message; default "gelf-java"
log4j.appender.Graylog2.facility=gelf-java
#includeLocation (true/false): Include caller file name and line number. Log4j documentation warns that generating caller location information is extremely slow and should be avoided unless execution speed is not an issue; default true
log4j.appender.Graylog2.includeLocation=true
#additionalFields: static fields to send to graylog. Defaults: none.
log4j.appender.Graylog2.additionalFields={'application': 'application name'}
log4j.appender.Graylog2.layout=org.apache.log4j.PatternLayout
log4j.appender.Graylog2.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss.SSS}][%t][%-5p][%c:%L]: %m%n