charm.log uses 'Error' for all stderr messages

Reported by Robert Ayres on 2012-03-14
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pyjuju
Low
Unassigned

Bug Description

The 'charm.log' for a unit logs all hook messages to stderr as 'ERROR', for example:

2012-03-13 13:50:10,845: hook.output@ERROR: Adding group `postfix' (GID 123) ...
2012-03-13 13:50:11,083: hook.output@ERROR: Done.
2012-03-13 13:50:11,227: hook.output@ERROR: Adding system user `postfix' (UID 115) ...
2012-03-13 13:50:11,349: hook.output@ERROR: Not creating home directory `/var/spool/postfix'.
2012-03-13 13:50:11,472: hook.output@ERROR: Creating /etc/postfix/dynamicmaps.cf
2012-03-13 13:50:11,476: hook.output@ERROR: Adding tcp map entry to /etc/postfix/dynamicmaps.cf
2012-03-13 13:50:11,690: hook.output@ERROR: Adding group `postdrop' (GID 124) ...
2012-03-13 13:50:11,733: hook.output@ERROR: Done.
2012-03-13 13:50:11,904: hook.output@ERROR: setting myhostname: xxx.compute-1.internal
2012-03-13 13:50:11,917: hook.output@ERROR: setting alias maps
2012-03-13 13:50:12,129: hook.output@ERROR: setting alias database

'grep ERROR charm.log | wc -l' reveals 72 lines of non-errors.

A lot of programs use stderr to output information that would otherwise disrupt a pipe on stdout, so I don't think it can safely be assumed it really is an error and reporting it as such is initially distracting.

Related branches

lp:~jml/juju/stderr-as-info
Merged into lp:juju at revision 548
Clint Byrum (community): Approve on 2012-06-22
Clint Byrum (clint-fewbar) wrote :

Robert, agreed, I think printing on stderr should probably be logged at the INFO level like stdout. Setting as Low, but leaving as New to allow more time for others to comment.

Changed in juju:
importance: Undecided → Low
Kapil Thangavelu (hazmat) wrote :

That sounds reasonable.

Changed in juju:
milestone: none → galapagos
status: New → Confirmed
Andreas Hasenack (ahasenack) wrote :

yes, please :)

Changed in juju:
milestone: galapagos → honolulu
Changed in juju:
status: Confirmed → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers