On Fri, Mar 17, 2017 at 08:07:38AM +0100, Martin Pieuchot wrote:
> On 17/03/17(Fri) 02:09, Alexander Bluhm wrote:
> > Replace logdebug() with generic log_debug() from log.c.  Implement
> > log_debugadd() to construct debug message incrementally.
> 
> FWIW the idea was to keep log.c identical in all daemons and put
> per-daemon log functions into logmsg.c.  I don't know how much this
> is applicable to syslogd(8) :)

syslogd is special, it needs a different implementation:

- It cannot use openlog(3) and syslog(3).  log.c must use syslogd(8)
  internal functions as backend.
- The backend has to be switched from stderr logging to internal
  logging as soon as the latter has been set up.  This gives
  additional functions in the API.
- I want to avoid malloc(3) in the logging path to make global error
  reporting reliable.
- syslogd uses more serverity levels than other daemons as it has
  been written with that in mind.  This API change could be adapted
  by the others.  log_info(LOG_NOTICE, ...)
- syslogd uses incremental debug messages because it can.  I don't
  want to change that now.  Perhaps this could be usefull for others.

I will delay the syslogd logging refactoring after 6.1 tagging.  It
touches too much code.

bluhm

Reply via email to