I think it's highly useful to have a single logging mechanism for cloud-init; I do like that cloud-init logs could also be redirected (copied) to rsyslog for offbox config. But I'm primarily interested in ensuring the the logs that cloud-init writes out are formatted the same; and that we don't wait until cloud-init config stage to configure logging as that prevents having all events logged in the same format for each of the four stages.
On Wed, Sep 28, 2016 at 11:19 AM, Scott Moser <smo...@ubuntu.com> wrote: > Cloud-init's logging basically employed a "try syslog and fallback to > direct log to file". > The proposed "just log to a file" is definitely dramatically simpler and > advantageous in some cases. > > The way the "try syslog and fallback" works (or worked) on Ubuntu up until > systemd was: > > a.) cloud-init init --local > 1. read logging config, > 2. attempt to log to syslog ([ *log_base, *log_syslog ]) > 3. that fail, so it log to file directly > > b.) cloud-init init > 1.) rsyslog would have /dev/log up functional at this point > 2.) cloud-init logging config read and ends up logging to syslog > > Systemd changed some things in teh way /dev/log was handled, and the above > no longer worked well. > > Additionally, cloud-init installs a file /etc/rsyslog.d/21-cloudinit.conf > which tells rsyslog to redirect messages generated by cloud-init to > /var/log/cloud-init.log > > The value of doing this in this way was that we use syslog, so if the user > had configured the system to log remotely, cloud-init's logs would go to > that remote system as they desired. > > If we directly log to a file, then cloud-init's log messages will not > without further configuration go to syslog. > > One other thing to be aware of is that cloud-init can itself configure > rsyslog through cloudinit/config/cc_rsyslog.py . So, the user could > provide in user-data some rsyslog configuration, and then the system's > syslog (including cloud-init messages) would start goign to that remote > server as soon as they realistically could. > > -- > https://code.launchpad.net/~harlowja/cloud-init/+git/ > cloud-init/+merge/301729 > 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 : cloud-init-dev@lists.launchpad.net > Unsubscribe : https://launchpad.net/~cloud-init-dev > More help : https://help.launchpad.net/ListHelp > -- https://code.launchpad.net/~harlowja/cloud-init/+git/cloud-init/+merge/301729 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 : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp