From 316bd855d5720f4babfb79d20c391de3f8958a60 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Tue, 28 Oct 2008 01:39:02 -0600 Subject: Added util.configure_logging() function; API.bootstrap() now calls util.configure_logging() --- ipalib/constants.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ipalib/constants.py') diff --git a/ipalib/constants.py b/ipalib/constants.py index 25ee6c312..7220561f7 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -87,3 +87,19 @@ DEFAULT_CONFIG = ( ('log', None), # Path to log file ) + + +LOGGING_CONSOLE_FORMAT = ' '.join([ + '%(levelname)s', + '%(message)s', +]) + + +# Tab-delimited format designed to be easily opened in a spreadsheet: +LOGGING_FILE_FORMAT = ' '.join([ + '%(created)f', + '%(levelname)s', + '%(message)r', # Using %r for repr() so message is a single line + '%(pathname)s', + '%(lineno)d', +]) -- cgit