Show More
@@ -104,8 +104,11 b' class Application(SingletonConfigurable):' | |||||
104 | config=True, |
|
104 | config=True, | |
105 | help="Set the log level by value or name.") |
|
105 | help="Set the log level by value or name.") | |
106 | def _log_level_changed(self, name, old, new): |
|
106 | def _log_level_changed(self, name, old, new): | |
|
107 | """Adjust the log level when log_level is set.""" | |||
107 | if isinstance(new, basestring): |
|
108 | if isinstance(new, basestring): | |
108 |
|
|
109 | new = getattr(logging, new) | |
|
110 | self.log_level = new | |||
|
111 | self.log.setLevel(new) | |||
109 |
|
112 | |||
110 | # the alias map for configurables |
|
113 | # the alias map for configurables | |
111 | aliases = Dict(dict(log_level='Application.log_level')) |
|
114 | aliases = Dict(dict(log_level='Application.log_level')) | |
@@ -179,10 +182,6 b' class Application(SingletonConfigurable):' | |||||
179 | if self.subapp is not None: |
|
182 | if self.subapp is not None: | |
180 | return self.subapp.start() |
|
183 | return self.subapp.start() | |
181 |
|
184 | |||
182 | def _log_level_changed(self, name, old, new): |
|
|||
183 | """Adjust the log level when log_level is set.""" |
|
|||
184 | self.log.setLevel(new) |
|
|||
185 |
|
||||
186 | def print_alias_help(self): |
|
185 | def print_alias_help(self): | |
187 | """Print the alias part of the help.""" |
|
186 | """Print the alias part of the help.""" | |
188 | if not self.aliases: |
|
187 | if not self.aliases: |
General Comments 0
You need to be logged in to leave comments.
Login now