I'd like to see this merged.
Currently we see mixed timestamp formats in cloud-init.log:
2016-08-29 15:12:15,475 - __init__.py[DEBUG]: handling ssh with freq=None and
Aug 29 15:12:15 p1 [CLOUDINIT] cloud-init-cfg[INFO]: cloud-init-cfg ['all',
The point in which the logging format changes depending on whether (and when)
the syslog service becomes available and cloud-init updates the logging
Besides the mixed format, the default rsyslog format (On Ubuntu at least)
doesn't include a sub-second timestamp by default, where as the logging module
default %(asctime) does at least provide millisecond resolution (note the ,475
in the %(asctime) and the lack of subsecond resolution in the second entry from
I'd also like to see a change to the default formatting string to include the
same [CLOUDINIT] string, which is injected in the syslog based formatting.
Keeping these strings consistent makes parsing cloud-init.log more reliable.
Please consider adding this to your MP, or conversely, I can propose this
this MP is merged.
root@x1:/etc/cloud/cloud.cfg.d# diff -u 05_logging.cfg.dist 05_logging.cfg
--- 05_logging.cfg.dist 2016-07-14 18:49:20.000000000 +0000
+++ 05_logging.cfg 2016-09-15 21:51:12.592673811 +0000
@@ -35,7 +35,7 @@
- format=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s
+ format=%(asctime)s [CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s
Your team cloud init development team is requested to review the proposed merge
of ~harlowja/cloud-init:just-file-logs into cloud-init:master.
Mailing list: https://launchpad.net/~cloud-init-dev
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help : https://help.launchpad.net/ListHelp