# /** # * '$rcsfile: log4j.properties,v $' # * copyright: 2002 regents of the university of california and the # * national center for ecological analysis and synthesis # * '$author: brooke $' # * '$date: 2003/06/24 00:58:49 $' # * '$revision: 1.1 $' # * # * 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 # */ # # ################################################################################ ################################################################################ # # for conversion/formatting characters, see: # # http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html # ################################################################################ ################################################################################ # set the log level to WARN and the log should be printed to stdout. #log4j.rootLogger=FATAL, stdout #log4j.threshold=FATAL, ERROR, WARN, INFO log4j.rootLogger=INFO,stdout ### LOGGING TO logfile ######################################################### log4j.appender.stdout=org.apache.log4j.RollingFileAppender log4j.appender.stdout.File=/var/log/tomcat9/portal.log log4j.appender.stdout.MaxFileSize=100MB log4j.appender.stdout.maxBackupIndex=10 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # define the pattern to be used in the logs... log4j.appender.stdout.layout.ConversionPattern=portal %d{yyyyMMdd-HH:mm:ss}: [%p]: %m [%c]%n ### LOGGING TO CONSOLE ######################################################### #log4j.appender.stdout=org.apache.log4j.ConsoleAppender #log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # %p -> priority level of the event - (e.g. WARN) # %m -> message to be printed # %c -> category name ... in this case name of the class # %d -> Used to output the date of the logging event. example, %d{HH:mm:ss,SSS} or %d{dd MMM yyyy HH:mm:ss,SSS}. Default format is ISO8601 format # %M -> print the method name where the event was generated ... can be extremely slow. # %L -> print the line number of the event generated ... can be extremely slow. # %t -> Used to output the name of the thread that generated the log event # %n -> carriage return ################################################################################ # EXAMPLE: Print only messages of level WARN or above in the package com.foo: log4j.logger.org.dataone.client.utils.HttpConnectionMonitorService=INFO log4j.logger.org.dataone.portal.TokenGenerator=INFO log4j.logger.org.dataone.client.rest.RestClient=WARN log4j.logger.org.dataone.service.util.ExceptionHandler=WARN log4j.logger.org.dataone=DEBUG