##// END OF EJS Templates
Merge pull request #8111 from jhamrick/fix-log-datefmt-changed...
Thomas Kluyver -
r20801:d79d5918 merge
parent child Browse files
Show More
@@ -159,7 +159,7 b' class Application(SingletonConfigurable):'
159 help="The date format used by logging formatters for %(asctime)s"
159 help="The date format used by logging formatters for %(asctime)s"
160 )
160 )
161 def _log_datefmt_changed(self, name, old, new):
161 def _log_datefmt_changed(self, name, old, new):
162 self._log_format_changed()
162 self._log_format_changed('log_format', self.log_format, self.log_format)
163
163
164 log_format = Unicode("[%(name)s]%(highlevel)s %(message)s", config=True,
164 log_format = Unicode("[%(name)s]%(highlevel)s %(message)s", config=True,
165 help="The Logging format template",
165 help="The Logging format template",
@@ -80,6 +80,7 b' class TestApplication(TestCase):'
80 # trigger reconstruction of the log formatter
80 # trigger reconstruction of the log formatter
81 app.log.handlers = [handler]
81 app.log.handlers = [handler]
82 app.log_format = "%(message)s"
82 app.log_format = "%(message)s"
83 app.log_datefmt = "%Y-%m-%d %H:%M"
83 app.log.info("hello")
84 app.log.info("hello")
84 nt.assert_in("hello", stream.getvalue())
85 nt.assert_in("hello", stream.getvalue())
85
86
General Comments 0
You need to be logged in to leave comments. Login now