Comment 4 for bug 1838032

Revision history for this message
Dan Watkins (oddbloke) wrote :

Yeah, that's a very fair point, Scott. In a freshly launched eoan container:

# journalctl | wc -l
375
# wc -l /var/log/cloud-init.log
679 /var/log/cloud-init.log

so we would be almost tripling the lines in the journal if we put everything from cloud-init over there.

If we exclude DEBUG lines, then we certainly won't make much of an impact on the journal size:

# grep -cv DEBUG /var/log/cloud-init.log
4

But unless those 4 lines are really good, I don't think we're adding much value. ;)

There is a fair amount of low-hanging fruit in the log, though:

Reading/writing files (a third of the lines!):
  # grep -c '\(Read\|Reading\|Writing to\) ' /var/log/cloud-init.log
  227

Running commands:
  # grep -c Running\ command /var/log/cloud-init.log
  28

Loading YAML:
  # grep -c "Attempting to load yaml" /var/log/cloud-init.log
  36

Internal handler logging:
  # grep -c '\(default\|Calling\) handler' /var/log/cloud-init.log
  32

Duplicate logging of config module start:
  # grep -c '\(using lock\|Running module\)' /var/log/cloud-init.log
  103

With all these excluded, we're down to 253 lines, which is within punching distance of reasonable, I think.

(FWIW, I think the right way to go around this would be to promote messages to INFO one-by-one, examining the non-DEBUG log output each time, to find a good balance between information and verbosity. The above exclusions are just to illustrate that we have an easy upper bound of ~250 lines.)