##// END OF EJS Templates
Fixing minor bug with the logging level in ipapp.py.
Brian Granger -
Show More
@@ -153,7 +153,6 b' class Application(object):'
153 self.log_level = self.command_line_config.Global.log_level
153 self.log_level = self.command_line_config.Global.log_level
154 except AttributeError:
154 except AttributeError:
155 pass # Use existing value which is set in Application.init_logger.
155 pass # Use existing value which is set in Application.init_logger.
156
157 self.log.debug("Command line config loaded:")
156 self.log.debug("Command line config loaded:")
158 self.log.debug(repr(self.command_line_config))
157 self.log.debug(repr(self.command_line_config))
159
158
@@ -236,11 +235,14 b' class Application(object):'
236 else:
235 else:
237 self.log.debug("Config file loaded: <%s>" % loader.full_filename)
236 self.log.debug("Config file loaded: <%s>" % loader.full_filename)
238 self.log.debug(repr(self.file_config))
237 self.log.debug(repr(self.file_config))
239 # We need to keeep self.log_level updated.
238 # We need to keeep self.log_level updated. But we only use the value
240 try:
239 # of the file_config if a value was not specified at the command
241 self.log_level = self.file_config.Global.log_level
240 # line.
242 except AttributeError:
241 if not hasattr(self.command_line_config.Global, 'log_level'):
243 pass # Use existing value
242 try:
243 self.log_level = self.file_config.Global.log_level
244 except AttributeError:
245 pass # Use existing value
244
246
245 def post_load_file_config(self):
247 def post_load_file_config(self):
246 """Do actions after the config file is loaded."""
248 """Do actions after the config file is loaded."""
@@ -413,6 +413,7 b' class IPythonApp(Application):'
413 # Make sure there is a space below the banner.
413 # Make sure there is a space below the banner.
414 if self.log_level <= logging.INFO: print
414 if self.log_level <= logging.INFO: print
415
415
416 # Now a variety of things that happen after the banner is printed.
416 self._enable_gui()
417 self._enable_gui()
417 self._load_extensions()
418 self._load_extensions()
418 self._run_exec_lines()
419 self._run_exec_lines()
General Comments 0
You need to be logged in to leave comments. Login now