#-----------------------------------------------------------------------------
# Name:      logging.properties
# Project:   xmlBlaster.org
# Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
#
# Comment:   Configure java.util.logging output (since JDK 1.4)
#
# Levels:    FINEST
#            FINER
#            FINE
#            INFO
#            WARNING
#            SEVERE
#            CONFIG
#
# Force the logging property file:
#  java -Djava.util.logging.config.file=$XMLBLASTER_HOME/config/logging.properties ...
#
# Configure logging from command line:
#  -logging FINE
#  -/node/heron/logging FINE
#  -logging/org.xmlBlaster.engine FINE
#  -/node/heron/logging/org.xmlBlaster.engine FINE

# Example to dump all SOCKET messages:
#  java org.xmlBlaster.Main -logging/org.xmlBlaster.util.protocol.RequestReplyExecutor FINEST

#->Main::main()->LogManager.readConfiguration(Input)

# We provide an own formatter which logs on one line (not two as java default) and uses colors on UNIX:
#  java.util.logging.FileHandler.formatter = org.xmlBlaster.util.log.XbFormatter
# Example: Starting with ISO 8601 timestamp of local time (see XbFormat.java how to configure GMT time)
#  2007-10-23 12:43:46.258  INFO   10-main RL0 org.xmlBlaster.engine.ServerScope initThis: Setting xmlBlaster instance name
#  <date>     <time>      <level> <thread> <RL> <category>                  <codeLocation> bla bla bla

# Added colors (UNIX) can be suppressed by java -DxmlBlaster/supressXtermColors=true ...
#-----------------------------------------------------------------------------

# "handlers" specifies a comma separated list of log Handler
# classes.  These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= java.util.logging.ConsoleHandler, org.xmlBlaster.util.log.XbNotifyHandler, java.util.logging.FileHandler 

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler

# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers.  For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level= INFO

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

# Here count=1 backup files with max size 1M are created
# default file output is in user's home directory (%h).
# "%t"   the system temporary directory
# "%h"   the value of the "user.home" system property
# "%g"   the generation number to distinguish rotated logs
# "%u"   a unique number to resolve conflicts
java.util.logging.FileHandler.pattern = %h/logs/xmlBlaster%u%g.log
java.util.logging.FileHandler.limit = 1000000
java.util.logging.FileHandler.count = 10
#java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.formatter = org.xmlBlaster.util.log.XbFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
#java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.formatter = org.xmlBlaster.util.log.XbFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# For example, set the com.xyz.foo logger to only log SEVERE
org.xmlBlaster.engine = INFO
#org.xmlBlaster.engine.handlers=org.xmlBlaster.util.log.XbHandler
#org.xmlBlaster.engine.useParentHandlers=false
#org.xmlBlaster.engine.config=org.xmlBlaster.util.log.XbConfig

#-----------------------------------------------------------------------------
# Trace flow of messages
# See http://www.xmlBlaster.org/xmlBlaster/doc/requirements/admin.checkpoint.html
# Checkpoints: "publish.ack", "update.queue.add", "update.ack"
# INFO dumps the most important data
# FINEST dumps the complete message
# OFF switches a checkpoint off
xmlBlaster.checkpoint=INFO
# Dump complete incoming message
#xmlBlaster.checkpoint.publish.ack.level=FINEST
# Don't log checkpoint "update.queue.add"
#xmlBlaster.checkpoint.update.queue.add.level=OFF
# Standard logging for "update.ack"
#xmlBlaster.checkpoint.update.ack.level=INFO

# Uncomment to redirect to separate file:
#xmlBlaster.checkpoint.handlers=org.xmlBlaster.util.log.FileHandler2
#xmlBlaster.checkpoint.useParentHandlers=false
org.xmlBlaster.util.log.FileHandler2.pattern = %h/logs/xmlBlasterCheckpoint%u%g.log
org.xmlBlaster.util.log.FileHandler2.limit = 1000000
org.xmlBlaster.util.log.FileHandler2.count = 10
org.xmlBlaster.util.log.FileHandler2.formatter = org.xmlBlaster.util.log.XbFormatter
#-----------------------------------------------------------------------------



#-----------------------------------------------------------------------------
# Trace flow of messages
# See javadoc of xmlBlaster/src/java/org/xmlBlaster/util/checkpoint/Checkpoint.java
# Checkpoints: "publish.enter", "publish.ack", "update.queue.add", "update.ack"
# on cluster-client side: "client.publish.enter", "client.publish.ack"
# INFO dumps the most important data
# FINEST dumps the complete message
# OFF switches a checkpoint off
xmlBlaster.checkpoint=INFO
xmlBlaster.checkpoint.handlers=org.xmlBlaster.util.log.FileHandler2
xmlBlaster.checkpoint.useParentHandlers=false
# Dump complete incoming message
#xmlBlaster.checkpoint.publish.ack.level=FINEST
# Don't log checkpoint "update.queue.add"
#xmlBlaster.checkpoint.update.queue.add.level=OFF
# Standard logging for "update.ack"
#xmlBlaster.checkpoint.update.ack.level=INFO

org.xmlBlaster.util.log.FileHandler2.pattern = %h/logs/xmlBlasterCheckpoint%u%g.log
org.xmlBlaster.util.log.FileHandler2.limit = 1000000
org.xmlBlaster.util.log.FileHandler2.count = 10
org.xmlBlaster.util.log.FileHandler2.formatter = org.xmlBlaster.util.log.XbFormatter
