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.)
Yeah, that's a very fair point, Scott. In a freshly launched eoan container:
# journalctl | wc -l cloud-init. log cloud-init. log
375
# wc -l /var/log/
679 /var/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!): |Reading\ |Writing to\) ' /var/log/ cloud-init. log
# grep -c '\(Read\
227
Running commands: cloud-init. log
# grep -c Running\ command /var/log/
28
Loading YAML: cloud-init. log
# grep -c "Attempting to load yaml" /var/log/
36
Internal handler logging: |Calling\ ) handler' /var/log/ cloud-init. log
# grep -c '\(default\
32
Duplicate logging of config module start: cloud-init. log
# grep -c '\(using lock\|Running module\)' /var/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.)