Author: johannes Date: 2007-11-13 08:07:03 -0600 (Tue, 13 Nov 2007) New Revision: 9798
Added: trunk/gnue-common/etc/sample.log.conf Log: Added sample configuration for logging Added: trunk/gnue-common/etc/sample.log.conf =================================================================== --- trunk/gnue-common/etc/sample.log.conf 2007-11-13 12:57:29 UTC (rev 9797) +++ trunk/gnue-common/etc/sample.log.conf 2007-11-13 14:07:03 UTC (rev 9798) @@ -0,0 +1,80 @@ +# Configuration file for GNU Enterprise logging facilities +# + +# Define which loggers are specified in this configuration file +[loggers] +keys=root,search,apperror,appforms + +# Define which handlers are specified in this configuration file +[handlers] +keys=default,searchhd,apperr,appforms + +# Define which formatters are specified in this configuration file +[formatters] +keys=default,appforms + +[logger_root] +level=ERROR +handlers=default + +[handler_default] +class=StreamHandler +level=NOTSET +formatter=default +args=(sys.stdout,) + +# Example: Logger which only logs messages of gnue.common.apps.GBaseApp +[logger_search] +level=DEBUG +handlers=searchhd +qualname=gnue.common.apps.GBaseApp +# Set propaget to 1 to propagate this message to the loggers higher up the +# hierarchy. +propagate=0 + +# This handler logs messages into the file search.log +[handler_searchhd] +class=FileHandler +level=NOTSET +formatter=default +args=('search.log', 'w') + +[formatter_default] +format=%(asctime)s %(levelname)s %(message)s + +# The following examples show how to log some exceptions +# Exceptions are logged as 'exception.<group>.<exceptionclass>' where '<group>' +# is one of 'system', 'admin', 'application', 'user' and '<exceptionclass>' is +# the full class name of the exception occured + +# Example: Logger which only logs application errors +[logger_apperror] +level=ERROR +handlers=apperr +qualname=exception.application +propagate=0 + +# This handler logs it's records into a file named 'app-error.log' which will +# be extended if already it exists +[handler_apperr] +class=FileHandler +formatter=default +args=('app-error.log', 'a') + +# This logger only logs ERROR level messages from the exception +# gnue.forms.GFObjects.GFField.MinimumLengthNotAllowedError +# It uses the handler 'appforms' +[logger_appforms] +level=ERROR +handlers=appforms +qualname=exception.application.gnue.forms.GFObjects.GFField.MinimumLengthNotAllowedError + +# This handler logs all records to the file 'app-forms.log' which will be +# extend if it already exists +[handler_appforms] +class=FileHandler +formatter=appforms +args=('app-forms.log', 'a') + +[formatter_appforms] +format=[FORMS] %(asctime)s %(levelname)s %(name)s: %(message)s _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue