Commit 4ca4d36a by Dag Wieers

Change syslog (priority) level from LOG_NOTICE to LOG_INFO

If you look at the meaning of the different syslog levels, NOTICE means that the event may need someone to look at it. Whereas INFO is pure informational.

Since module invocations are in fact requested (deliberate) actions, they shouldn't need any additional post-processing, and therefore should not be logged as NOTICE.

This may seem like hairsplitting, but correctly categorizing system events helps weeding through the noise downhill.

According to Wikipedia: https://en.wikipedia.org/wiki/Syslog

5 	Notice 		notice 	Events that are unusual but not error conditions .
6 	Informational 	info 		Normal operational messages -no action required. Example an application has started, paused or ended successfully.
parent 7c65f3dd
...@@ -1161,10 +1161,10 @@ class AnsibleModule(object): ...@@ -1161,10 +1161,10 @@ class AnsibleModule(object):
except IOError, e: except IOError, e:
# fall back to syslog since logging to journal failed # fall back to syslog since logging to journal failed
syslog.openlog(str(module), 0, syslog.LOG_USER) syslog.openlog(str(module), 0, syslog.LOG_USER)
syslog.syslog(syslog.LOG_NOTICE, msg) #1 syslog.syslog(syslog.LOG_INFO, msg) #1
else: else:
syslog.openlog(str(module), 0, syslog.LOG_USER) syslog.openlog(str(module), 0, syslog.LOG_USER)
syslog.syslog(syslog.LOG_NOTICE, msg) #2 syslog.syslog(syslog.LOG_INFO, msg) #2
def _set_cwd(self): def _set_cwd(self):
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment