On 02/22/2014 03:26 AM, Michael DeHaan wrote: > Exactly. > > ---------- Forwarded message ---------- > From: *Strahinja Kustudić* <[email protected] > <mailto:[email protected]>> > Date: Fri, Feb 21, 2014 at 7:54 PM > Subject: Re: [ansible-project] Disable logging in syslog, logging in > general, how to implement it? > To: [email protected] > <mailto:[email protected]> > > > So basically a no_log to work in a play and as a setting in > ansible.cfg is fine with you. Sounds good to me :) > > > > > -- > You received this message because you are subscribed to the Google > Groups "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAEVJ8QNuRdhsLo8J3n-opVsffb3gDofuemrH-_EHw8W5j6zKbg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out.
In addition to a boolean 'no_log' option I would suggest another 'log_level' option that would control the level of logging at global level (in asinble.cfg), at command-line invocation level (with a --log-level option) and on a per task basis. The precedence of these options can be discussed further but I think it would be reasonable to have: command-line > per task option > ansible.cfg option. Possible levels would be 'debug', 'info', 'warning' and 'error' with the default being 'info'. Modules could be taught to produce logs at specific levels (or at the default level if a specific level is not given). If 'log_level' is set to 'debug' everything should be logged. If set to 'info' it will let all messages go to logs but not those at 'debug' level. If set to 'warning', it will let messages at 'warning' and 'error' level, and if set to 'error' it will let only messages at 'error' level. If logging to syslog, journal, etc., the log message level could be mapped to an appropriate level on each system. What do you think? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/530877BA.4000709%40yahoo.gr. For more options, visit https://groups.google.com/groups/opt_out.
