Show More
@@ -26,6 +26,7 b' from __future__ import print_function' | |||
|
26 | 26 | # Imports |
|
27 | 27 | #----------------------------------------------------------------------------- |
|
28 | 28 | |
|
29 | import logging | |
|
29 | 30 | from copy import deepcopy |
|
30 | 31 | |
|
31 | 32 | from .loader import Config, LazyConfigValue |
@@ -381,6 +382,9 b' class LoggingConfigurable(Configurable):' | |||
|
381 | 382 | log = Instance('logging.Logger') |
|
382 | 383 | def _log_default(self): |
|
383 | 384 | from IPython.config.application import Application |
|
384 |
|
|
|
385 | if Application.initialized(): | |
|
386 | return Application.instance().log | |
|
387 | else: | |
|
388 | return logging.getLogger() | |
|
385 | 389 | |
|
386 | 390 |
@@ -25,6 +25,7 b' Authors' | |||
|
25 | 25 | |
|
26 | 26 | import argparse |
|
27 | 27 | import copy |
|
28 | import logging | |
|
28 | 29 | import os |
|
29 | 30 | import re |
|
30 | 31 | import sys |
@@ -308,7 +309,10 b' class ConfigLoader(object):' | |||
|
308 | 309 | |
|
309 | 310 | def _log_default(self): |
|
310 | 311 | from IPython.config.application import Application |
|
311 |
|
|
|
312 | if Application.initialized(): | |
|
313 | return Application.instance().log | |
|
314 | else: | |
|
315 | return logging.getLogger() | |
|
312 | 316 | |
|
313 | 317 | def __init__(self, log=None): |
|
314 | 318 | """A base class for config loaders. |
General Comments 0
You need to be logged in to leave comments.
Login now