quattor/ncm-cdispd

Make logging to syslog sane

Closed this issue · 5 comments

The logging to syslog tries to dump everything in one entry, which means newlines are missing and it gets truncated. We probably need separate line in the syslog for each log entry.

Sep 18 10:04:51 lcg-erasmustest ncm-cdispd[2028]: [INFO] NCM-NCD version 13.1.1 started by root at: Wed Sep 18 10:04:26 2013 [INFO] executing configure on components.... [INFO] running component: spma --------------------------------------------------------- [OK] updated SPMA configuration file /etc/spma.conf [OK] updated SPMA target configuration file in /var/lib/spma-target.cf [INFO] running the SPMA [INFO] SPMA output produced: (please check spma.log) [INFO] SPMA version 1.12.0 started by root at: Wed Sep 18 10:04:29 2013 [INFO] using local package cache in: /var/spma-cache/ [INFO] proxy server not activated [WARN] /bin/rpm--version produced STDERR output: [INFO] examining local installations.. [INFO] reading target configuration .. [INFO] executing operations.. [INFO] Packages are up-to-date - no operations to perform. [OK] SPMA finished successfully. [OK] SPMA finished succesfully (please check spma.log) [INFO] configure on component spma executed, 0 errors, 0 warnings [INFO] running component: syslo

#8 could have been a good occasion to fix this issue. But looking at it, I am not sure that the problem is in ncm-cdispd as it works when writing to /var/log/ncm-cdispd.log. I can imagine that this is a syslog restriction that it logs any message as one line, stripping the new line delimiters present in the message. In this case, we may need to modify CAF::Reporter: issue quattor/CAF#32 open. I don't think there is anything we can do in ncm-cdispd itself.

After discussion in quattor/CAF#32 confirming the analysis, I close this issue where ncm-cdispd is a victim rather than a culprit!

Issue reopened after quattor/CAF#32 discussion where the consensus was that this should be considered as a ncm-cdispd specific issue and that the problem identified had to be fixed in ncm-cdispd.

The proposal is to remove the logging of this big blob corresponding to ncm-ncd output as this just duplicates things already logged to syslog and to component log files (in /var/log/ncm). The output will be kept only in debug mode.

There is still an issue to be checked in ncm-ncd that doesn't seem to log to syslog the summary lines (number and name of components with warning and errors). Stay tuned!

No issues found with ncm-ncd: just my eyes tired, once again!!!

Fixed by #11