# /**
#  *  '$rcsfile: log4j2.properties,v $'
#  *  copyright: 2020 regents of the university of california and the
#  *              national center for ecological analysis and synthesis
#  *
#  * this program is free software; you can redistribute it and/or modify
#  * it under the terms of the gnu general public license as published by
#  * the free software foundation; either version 2 of the license, or
#  * (at your option) any later version.
#  *
#  * this program is distributed in the hope that it will be useful,
#  * but without any warranty; without even the implied warranty of
#  * merchantability or fitness for a particular purpose.  see the
#  * gnu general public license for more details.
#  *
#  * you should have received a copy of the gnu general public license
#  * along with this program; if not, write to the free software
#  * foundation, inc., 59 temple place, suite 330, boston, ma  02111-1307  usa
#  */

name=Log4j2PropertiesConfigForMetacat

#Reload the file every 120 seconds
monitorInterval=120

#############################################################
# the appendder named consoleAppender with the Console type #
#############################################################
appender.consoleAppender.type=Console
appender.consoleAppender.name=consoleAppender
appender.consoleAppender.layout.type=PatternLayout
appender.consoleAppender.layout.pattern=@build.context@ %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%C:%M:%L]%n

######################################################################
# the appendder named replicationAppender with the rolling file type #
######################################################################
appender.replicationAppender.type=RollingFile
appender.replicationAppender.name=replicationAppender
# the path is relative to the process working directoy. You may specify the absolute path
# in both fileName and filePattern properties
appender.replicationAppender.fileName=../logs/metacatReplication.log
appender.replicationAppender.filePattern=../logs/metacatReplication-%d{MM-dd-yy-HH-mm-ss}-%i.log
appender.replicationAppender.layout.type=PatternLayout
appender.replicationAppender.layout.pattern=@build.context@ %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%c]%n
appender.replicationAppender.policies.type=Policies
#appender.replicationAppender.policies.time.type=TimeBasedTriggeringPolicy
#appender.replicationAppender.policies.time.interval=1
#appender.replicationAppender.policies.time.modulate=true
appender.replicationAppender.policies.size.type=SizeBasedTriggeringPolicy
appender.replicationAppender.policies.size.size=30MB
appender.replicationAppender.strategy.type=DefaultRolloverStrategy
appender.replicationAppender.strategy.max=100

##################################
# the root logger configuration  #
##################################
rootLogger.level=ERROR
rootLogger.appenderRef.console.ref=consoleAppender

################################################################################
# a customized logger - dataone for the package org.dataone.client on console  #
################################################################################
logger.dataone.name=org.dataone.client
logger.dataone.level=WARN
logger.dataone.appenderRef.console.ref=consoleAppender

################################################################################
# a rolling logger - replication for the package org.dataone.client on files   #
################################################################################
logger.replication.name=ReplicationLogging
logger.replication.level=ERROR
logger.replication.additivity=false
logger.replication.appenderRef.rolling.ref=replicationAppender