#------------------------------------------------------------------------------
#
#  The following properties set the logging levels and log appender.  The
#  log4j.rootCategory variable defines the default log level plus one or more
#  appenders.  
#
#  To override the default (rootCategory) log level, 
#  define a property of the form (see below for available values):
#
#    Available logger names:
#      CONSOLE  The command line console (defaults to standard error output)
#      FILE     The log file to write to.
#
#    Possible Log Levels:
#      ERROR - only errors during processing are logged, or FATAL.
#      WARN  - warnings, errors and fatal are logged.
#      INFO  - general info messages and all the above are logged.
#      DEBUG - more detailed messages and all the above are logged.
#      TRACE - the most detailed messages and all the above are logged.
#
#      OFF   - This will turn off logging for an appender.
#
#------------------------------------------------------------------------------

log4j.rootLogger=INFO, CONSOLE, FILE

# create substitutions for appenders
date-pattern={yyyy-MM-dd HH:mm#------------------------------------------------------------------------------
#
#  The following properties set the logging levels and log appender.  The
#  log4j.rootCategory variable defines the default log level plus one or more
#  appenders.  
#
#  To override the default (rootCategory) log level, 
#  define a property of the form (see below for available values):
#
#    Available logger names:
#      CONSOLE  The command line console (defaults to standard error output)
#      FILE     The log file to write to.
#
#    Possible Log Levels:
#      ERROR - only errors during processing are logged, or FATAL.
#      WARN  - warnings, errors and fatal are logged.
#      INFO  - general info messages and all the above are logged.
#      DEBUG - more detailed messages and all the above are logged.
#      TRACE - the most detailed messages and all the above are logged.
#
#      OFF   - This will turn off logging for an appender.
#
#------------------------------------------------------------------------------

log4j.rootLogger=INFO, CONSOLE, FILE

# create substitutions for appenders
date-pattern={yyyy-MM-dd HH:mm:ss}

#------------------------------------------------------------------------------
# direct log messages to console
#------------------------------------------------------------------------------

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
# Send debugging to error output so it can be differentiated from FITS file output which goes to standard out.
log4j.appender.CONSOLE.Target=System.err
log4j.appender.CONSOLE.Threshold=ERROR
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - %c{1}:%L - %m%n
# Detailed appender for debugging, includes thread name:
#log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n

#------------------------------------------------------------------------------
# direct messages to a log file
#
#  The following properties configure the Rolling File appender.
#  See http://logging.apache.org/log4j/1.2/ for details.
#
#------------------------------------------------------------------------------
log4j.appender.FILE = org.apache.log4j.RollingFileAppender
log4j.appender.FILE.File = ./fits.log
log4j.appender.FILE.Threshold=ERROR
log4j.appender.FILE.Append = true
log4j.appender.FILE.MaxFileSize=10MB
log4j.appender.FILE.MaxBackupIndex=10
log4j.appender.FILE.layout = org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - %c{1}:%L - %m%n
# Detailed appender for debugging, includes thread name:
#log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n

# Java package-specific appenders
log4j.logger.uk.gov.nationalarchives.droid=FATAL, CONSOLE, FILE
log4j.logger.edu.harvard.hul.ois.jhove=FATAL, CONSOLE, FILE
log4j.logger.org.apache.tika=FATAL, CONSOLE, FILE
log4j.logger.net.sf=ERROR, CONSOLE, FILE
:ss}

#------------------------------------------------------------------------------
# direct log messages to console
#------------------------------------------------------------------------------

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
# Send debugging to error output so it can be differentiated from FITS file output which goes to standard out.
log4j.appender.CONSOLE.Target=System.err
log4j.appender.CONSOLE.Threshold=ERROR
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - %c{1}:%L - %m%n
# Detailed appender for debugging, includes thread name:
#log4j.appender.CONSOLE.layout.ConversionPattern=%d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n

#------------------------------------------------------------------------------
# direct messages to a log file
#
#  The following properties configure the Rolling File appender.
#  See http://logging.apache.org/log4j/1.2/ for details.
#
#------------------------------------------------------------------------------
log4j.appender.FILE = org.apache.log4j.RollingFileAppender
log4j.appender.FILE.File = /log/fits.log
log4j.appender.FILE.Threshold=ERROR
log4j.appender.FILE.Append = true
log4j.appender.FILE.MaxFileSize=10MB
log4j.appender.FILE.MaxBackupIndex=10
log4j.appender.FILE.layout = org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - %c{1}:%L - %m%n
# Detailed appender for debugging, includes thread name:
#log4j.appender.FILE.layout.ConversionPattern = %d${date-pattern} - %5p - [%t] %c{1}:%L - %m%n

# Java package-specific appenders
log4j.logger.uk.gov.nationalarchives.droid=FATAL, CONSOLE, FILE
log4j.logger.edu.harvard.hul.ois.jhove=FATAL, CONSOLE, FILE
log4j.logger.org.apache.tika=FATAL, CONSOLE, FILE
log4j.logger.net.sf=ERROR, CONSOLE, FILE

