# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.


# An example log4j configuration file that outputs to System.out.  The
# output information consists of relative time, log level, thread
# name, logger name, nested diagnostic context and the message in that
# order.

# For the general syntax of property based configuration files see the
# documenation of org.apache.log4j.PropertyConfigurator.

#log4j.rootLogger=DEBUG, fileAppender, consoleAppender

# ConsoleAppender
log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c{2} %3x - %m%n

# SocketAppender
log4j.appender.socketAppender=org.apache.log4j.net.SocketAppender
log4j.appender.socketAppender.remoteHost=localhost
log4j.appender.socketAppender.port=4445
log4j.appender.socketAppender.locationInfo=true

# Regular FileAppender
# NOTE: altering the ConversionPattern will cause a portion of the AdminTool's Log Viewer module to stop working properly
log4j.appender.fileAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.fileAppender.File=logs/smartfox.log
log4j.appender.fileAppender.layout.ConversionPattern=%d{dd MMM yyyy | HH:mm:ss,SSS} | %-5p | %t | %c{3} | %3x | %m%n
log4j.appender.fileAppender.Encoding=UTF-8
log4j.appender.fileAppender.DatePattern='.'yyyy-MM-dd

# BootLogger FileAppender(s)
log4j.appender.bootFileAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.bootFileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.bootFileAppender.File=logs/boot/boot.log
log4j.appender.bootConsoleAppender.threshold=DEBUG
log4j.appender.bootFileAppender.layout.ConversionPattern=%d{dd MMM yyyy | HH:mm:ss,SSS} | %-5p | %t | %c{3} | %3x | %m%n
log4j.appender.bootFileAppender.Encoding=UTF-8

log4j.appender.bootConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.bootConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.bootConsoleAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c{3} %3x - %m%n
log4j.appender.bootConsoleAppender.threshold=WARN


# ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n

# The file is rolled over very day
# '.'yyyy-MM-dd-HH                      rolls every hour
# '.'yyyy-MM-dd-HH-mm           rolls every minute
log4j.appender.fileAppender.DatePattern  ='.'yyyy-MM-dd

# log4j.category.com.smartfoxserver.v2=DEBUG,consoleAppender,fileAppender,socketAppender
log4j.category.com.smartfoxserver=ERROR,consoleAppender,fileAppender
log4j.category.org.apache= ERROR,consoleAppender,fileAppender
log4j.category.org.apache.http=ERROR,consoleAppender,fileAppender
log4j.category.org.eclipse.jetty=WARN,consoleAppender,fileAppender
log4j.category.bootLogger=DEBUG,bootFileAppender,bootConsoleAppender
log4j.category.sfs2x=ERROR,consoleAppender,fileAppender
log4j.category.Extensions=ERROR,consoleAppender,fileAppender
log4j.category.hsqldb.db=WARN,consoleAppender,fileAppender
log4j.category.jndi=INFO,consoleAppender,fileAppender
