[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pengfork-devel] Logging and debug facilities
From: |
Nicolas Burrus |
Subject: |
Re: [Pengfork-devel] Logging and debug facilities |
Date: |
Thu, 29 Aug 2002 23:39:08 +0200 |
User-agent: |
KMail/1.4.3 |
On Thursday 29 August 2002 23:17, Jean-Charles Salzeber wrote:
> On Thu, Aug 29, 2002 at 17:24, Nicolas Burrus wrote:
> > I've commited a first version, please send feedback.
> >
> > There is two functions, log() and debug(), the first send to syslog, the
> > second to stderr. Debug level is set to -1 by default, so waiting for
> > command line options (certainely this night), set PARAM_DEBUG_LEVEL = 1
> > in main.c for example.
> >
> > log level parameter correspond to syslog parameters.
> >
> > --
> > Nicolas
>
> well, I've some remarks:
> * the log function always write to stderr *AND* syslog, is this the
> desired behaviour?
> * I was thinking that log should write to syslog if in daemon mode and
> to stdout/stderr in command line mode
Ok, why not, as stderr, stdout, ... are disabled in daemon mode it would react
the good way, but a test is cleaner. I don't know it is standard to syslog
when running in interactive mode, but if it is I think it can be great to
keep a trace even when not running in daemon mode.
> * Log may write to stderr only if level >= LOG_WARNING
Why not, and maybe write all syslog msg if PARAM_DEBUG_LEVEL is > 0 ?
> * debug should write to stdout not stderr debug is normally not error ;)
Right :)
--
Nicolas