summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/constants.py3
-rw-r--r--ipalib/plugable.py2
-rw-r--r--ipalib/util.py3
3 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py
index 7220561f..f4a440c6 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -89,7 +89,8 @@ DEFAULT_CONFIG = (
)
-LOGGING_CONSOLE_FORMAT = ' '.join([
+LOGGING_CONSOLE_FORMAT = ': '.join([
+ '%(name)s',
'%(levelname)s',
'%(message)s',
])
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index dd74dc08..b0ba32b7 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -744,7 +744,7 @@ class API(DictProxy):
self.env.log,
self.env.verbose,
)
- object.__setattr__(self, 'log', 'logger')
+ object.__setattr__(self, 'logger', logger)
def load_plugins(self):
"""
diff --git a/ipalib/util.py b/ipalib/util.py
index 280910dc..d577524b 100644
--- a/ipalib/util.py
+++ b/ipalib/util.py
@@ -114,10 +114,10 @@ def configure_logging(log_file, verbose):
level -= 10
log = logging.getLogger('ipa')
+ log.setLevel(level)
# Configure console handler
console = logging.StreamHandler()
- console.setLevel(level)
console.setFormatter(logging.Formatter(LOGGING_CONSOLE_FORMAT))
log.addHandler(console)
@@ -130,7 +130,6 @@ def configure_logging(log_file, verbose):
log.warn('Could not create log_dir %r', log_dir)
return log
file_handler = logging.FileHandler(log_file)
- file_handler.setLevel(level)
file_handler.setFormatter(logging.Formatter(LOGGING_FILE_FORMAT))
log.addHandler(file_handler)