[nas] [RFC] send debug output to syslog as well
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Wed Jan 30 03:14:23 MST 2008
Hi,
On Tue, Jan 29, 2008 at 06:22:55PM -0700, Jon Trulson wrote:
> On Tue, 29 Jan 2008, Erik Auerswald wrote:
> >it can be useful to send debugging output to syslog as well as to
> >stderr. For example when trying to debug an intermittent problem with a
> >most of the time working nasd. The current code disables using syslog
> >when the debug option is set.
> >
> >[...PATCH...]
> >
> >Setting the debug-level should help controlling the generated output.
> >
> >What do you think? Is there a need for _not_ sending the debug output to
> >syslog? Do we need to separate debug output from normal output by
> >introducing an osLogDebug() function, sending a LOG_DEBUG level message
> >to syslog and writing the same message to stderr?
> >
>
> I think I was just being lazy... When debugging, I like to run nasd
> w/ '-d XX' and have all the output go to stderr (I don't run it as a
> daemon in these cases).
>
> Your patch does this incidentally - it's ok by me.
>
> >I don't like the current situation, but I don't want to change this
> >without some feedback first. And I am definitely too lazy to implement
> >the osLogDebug() solution without being convinced this is necessary. ;-)
>
> Would it make sense to have debugging go to stderr only if it's not
> running as a daemon?
Using syslog if running as daemon and stderr otherwise makes sense. I'll
take a look at how to implement this later...
Erik
More information about the Nas
mailing list