Commit 0b2e58be authored by wang lei's avatar wang lei

日志文件输出

parent 3531f69b
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: Solo logging configurations.
# Version: 1.1.0.4, Nov 5, 2015
# Author: Liang Ding
#
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p]-[%d{yyyy-MM-dd HH:mm:ss}]-[%c:%L]: %m%n
log4j.logger.org.b3log.solo=INFO
log4j.logger.org.b3log.latke=ERROR
log4j.logger.org.b3log.latke.util.freemarker.Templates=ERROR
log4j.logger.org.eclipse.jetty=WARN
log4j.logger.freemarker=WARN
log4j.logger.com.mchange=WARN
#
# Copyright (c) 2010-2016, b3log.org & hacpai.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: Solo logging configurations.
# Version: 1.1.0.4, Nov 5, 2015
# Author: Liang Ding
#
log4j.rootLogger=INFO,stdout,MYFILE
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n
# Print only messages of level ERROR or above in the package noModule.
log4j.logger.noModule=FATAL
log4j.logger.org.b3log.solo=INFO,MYFILE
log4j.logger.org.b3log.latke=INFO,MYFILE
log4j.logger.org.b3log.latke.util.freemarker.Templates=ERROR,MYFILE
log4j.logger.org.eclipse.jetty=WARN,MYFILE
log4j.logger.freemarker=WARN,MYFILE
log4j.logger.com.mchange=WARN,MYFILE
log4j.appender.MYFILE=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.MYFILE.File=/data/logs/myblog.log
log4j.appender.MYFILE.File=/logs/myblog.log
log4j.appender.MYFILE.DatePattern=.yyyy-MM-dd
log4j.appender.MYFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.MYFILE.layout.ConversionPattern=[%d{HH\:mm\:ss}] %p %c - %m%n
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment