diff --git a/IPython/config/application.py b/IPython/config/application.py index b6fea3d..0d1abd7 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -521,10 +521,12 @@ class Application(SingletonConfigurable): # unlikely event that the error raised before filefind finished filename = loader.full_filename or filename # problem while running the file - log.error("Exception while loading config file %s", - filename, exc_info=True) + if log: + log.error("Exception while loading config file %s", + filename, exc_info=True) else: - log.debug("Loaded config file: %s", loader.full_filename) + if log: + log.debug("Loaded config file: %s", loader.full_filename) if config: yield config