From ca7e2d29d343ad8f8b3bb47fc8b9225d4f77da94 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 24 Sep 2014 09:51:36 -0400 Subject: [PATCH] add time to logging in unit tests It's quite difficult to debug unit test failures when you don't have any idea when the log messages happened relative to each other. Update the logging fixture so that we are actually writing out time into our log messages. Change-Id: I704792f10d77345246d528bd9abf2e0c46b6df72 --- nova/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/test.py b/nova/test.py index c7ec217ce..f100b679a 100644 --- a/nova/test.py +++ b/nova/test.py @@ -271,7 +271,7 @@ class TestCase(testtools.TestCase): level = logging.INFO # Collect logs - fs = '%(levelname)s [%(name)s] %(message)s' + fs = '%(asctime)s %(levelname)s [%(name)s] %(message)s' self.useFixture(fixtures.FakeLogger(format=fs, level=None)) root.handlers[0].setLevel(level)