From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Dake Date: Mon, 10 Nov 2008 23:00:58 -0700 Subject: [Cluster-devel] logging: final call on configuration, output and implementation In-Reply-To: <1226382840.2445.78.camel@daitarn-fedora.int.fabbione.net> References: <1226344150.2445.61.camel@daitarn-fedora.int.fabbione.net> <1226364388.14398.7.camel@balance> <1226379312.2445.73.camel@daitarn-fedora.int.fabbione.net> <1226382444.14398.18.camel@balance> <1226382840.2445.78.camel@daitarn-fedora.int.fabbione.net> Message-ID: <1226383258.14398.31.camel@balance> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, 2008-11-11 at 06:54 +0100, Fabio M. Di Nitto wrote: > On Mon, 2008-11-10 at 22:47 -0700, Steven Dake wrote: > > On Tue, 2008-11-11 at 05:55 +0100, Fabio M. Di Nitto wrote: > > > On Mon, 2008-11-10 at 17:46 -0700, Steven Dake wrote: > > > > I disagree with a global debug keyword. > > > > At one time I thought it was a > > > > good idea but that time has long since passed. The idea of turning > > > > debug to on and then having all debug output go to syslog is frightening > > > > and will result in lost messages. While it appears this proposal > > > > includes the selectable log output filtering per output medium as was > > > > discussed already, it is unclear how the debug keyword affects this. It > > > > would simply make sense to change the file's log priority or the > > > > syslog's log priority if that is the behavior desired and then no need > > > > for any extra keyword. > > > > > > You have these two situations: > > > > > > print_log(LOG_DEBUG, "doing this and that....\n"); > > > > > > if (debug) { /* > > > gather_some_data_that_is_very_expensive_operation_to_do_all_the_time(); > > > print_log(LOG_DEBUG, "print those extra data\n"); > > > } > > > > > > as it is now, it would basically be an alias to set logpriority to DEBUG > > > but enables people to execute debugging code conditionally and as I > > > wrote it is an easy keyword to remember compared to > > > syslog_priority/logpriority. > > > > > > Fabio > > > > > > > The second situation doesn't exist in any code I have written and never > > would. > > Clearly you haven't read what I wrote in the debugging note. > I read it but don't agree you can have a discussion about logging and flight recording without discussing how debugging fits into the log system. > > Turning debug on for all of the entire stack to be output to syslog is > > not satisfactory because messages would be lost in overload conditions. > > Logging to file is only a slight bit better solution but if you really > > must have debug output in a persistent store that doesn't occur as a > > result of a failure, logging to file is the only suitable answer. > > Please point me to where I wrote that it should go to syslog as I only > mentioned logfile_priority so far. > If syslog is configured it will go to syslog by default in your scheme. Regards -steve > Fabio >