##// END OF EJS Templates
make config-loading debug messages more explicit...
MinRK -
Show More
@@ -373,10 +373,14 b' class Application(SingletonConfigurable):'
373 # problem with the file (probably doesn't exist), raise
373 # problem with the file (probably doesn't exist), raise
374 raise
374 raise
375 except Exception:
375 except Exception:
376 # try to get the full filename, but it will be empty in the
377 # unlikely event that the error raised before filefind finished
378 filename = loader.full_filename or filename
376 # problem while running the file
379 # problem while running the file
377 self.log.error("Exception while loading config file %s [path=%s]"%
380 self.log.error("Exception while loading config file %s",
378 (filename, path), exc_info=True)
381 filename, exc_info=True)
379 else:
382 else:
383 self.log.debug("Loaded config file: %s", loader.full_filename)
380 self.update_config(config)
384 self.update_config(config)
381
385
382 def generate_config_file(self):
386 def generate_config_file(self):
@@ -172,6 +172,7 b' class BaseIPythonApplication(Application):'
172 printed on screen. For testing, the suppress_errors option is set
172 printed on screen. For testing, the suppress_errors option is set
173 to False, so errors will make tests fail.
173 to False, so errors will make tests fail.
174 """
174 """
175 self.log.debug("Searching path %s for config files", self.config_file_paths)
175 base_config = 'ipython_config.py'
176 base_config = 'ipython_config.py'
176 self.log.debug("Attempting to load config file: %s" %
177 self.log.debug("Attempting to load config file: %s" %
177 base_config)
178 base_config)
@@ -183,6 +184,7 b' class BaseIPythonApplication(Application):'
183 )
184 )
184 except IOError:
185 except IOError:
185 # ignore errors loading parent
186 # ignore errors loading parent
187 self.log.debug("Config file %s not found", base_config)
186 pass
188 pass
187 if self.config_file_name == base_config:
189 if self.config_file_name == base_config:
188 # don't load secondary config
190 # don't load secondary config
@@ -198,8 +200,10 b' class BaseIPythonApplication(Application):'
198 except IOError:
200 except IOError:
199 # Only warn if the default config file was NOT being used.
201 # Only warn if the default config file was NOT being used.
200 if self.config_file_specified:
202 if self.config_file_specified:
201 self.log.warn("Config file not found, skipping: %s" %
203 msg = self.log.warn
202 self.config_file_name)
204 else:
205 msg = self.log.debug
206 msg("Config file not found, skipping: %s", self.config_file_name)
203 except:
207 except:
204 # For testing purposes.
208 # For testing purposes.
205 if not suppress_errors:
209 if not suppress_errors:
General Comments 0
You need to be logged in to leave comments. Login now