Understanding the logging concept

Russ Allbery rra at stanford.edu
Wed Jul 12 14:39:06 UTC 2006


Christoph Biedl <cbiedl at CIS.FU-Berlin.DE> writes:

> I'm trying to understand the concept of the way innd and other programs
> are emitting log messages (all in CURRENT).

> On the one hand programs do call the openlog() and syslog() functions
> provided by the system library. On the other hand there's a complex set
> of configurable functions in lib/messages.c (via
> message_handlers_*). And finally I find programs that do both, like
> nnrpd/nnrpd.c:

> |    openlog(message_program_name, L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG);
> |    message_handlers_die(1, message_log_syslog_crit);
> |    message_handlers_warn(1, message_log_syslog_warning);
> |    message_handlers_notice(1, message_log_syslog_notice);

> What's the idea? Are there plans to move _all_ the logging from immediate
> syscall to notice/warn/die provided by lib/messages.c and CURRENT is just
> in the middle of transistion?

Yes.

Note that you still have to call openlog when using the message.c
functions if you're using a message handler that logs to syslog.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list