How do I stop nnrpd from logging to warn
Jeffrey M. Vinocur
jeff at litech.org
Mon Nov 28 01:20:04 UTC 2005
On Nov 27, 2005, at 8:42 AM, Bill Davidsen wrote:
> Gunnar Grim wrote:
>
>> As a temporary solution I've changed the f_warn filter so that it
>> doesn't
>> include the facility news, but that is not really what I want. I'd
>> like real
>> warnings from news to be logged to warn. What I don't like is that
>> nnrp logs
>> these messages as warnings:
>>
>> Nov 26 16:44:54 gunnar nnrpd[14701]: gunnar.home (127.0.0.2) connect
>> Nov 26 16:44:54 gunnar nnrpd[14701]: gunnar.home user gugrim
>> Nov 26 16:44:54 gunnar nnrpd[14701]: gunnar.home group doi.announce 0
>> Nov 26 16:45:00 gunnar nnrpd[14701]: gunnar.home group doi.help 0
>> Nov 26 16:45:00 gunnar nnrpd[14701]: gunnar.home times user 0.002
>> system
>> 0.003 idle 0.002 elapsed 5.912
>>
>> I think 'notice' is a more appropriate level for them, but perhaps
>> that's not
>> configurable.
It's not configurable without recompiling, but that's okay. INN's
log levels may not quite correspond to the other software you use,
but I believe you can adjust your syslog configuration to achieve the
effect you desire.
INN logs routinely come out to syslog at three different levels,
LOG_CRIT, LOG_ERR, and LOG_WARNING. As you observed, most of the
stuff at the lowest level is pretty unimportant. That's why the
recommended syslog configuration is to write that to a separate
logfile (news.notice) that is automatically summarized into a daily
report, rotated, and eventually discarded. But if you want to mingle
them with your other logs, simply configure your syslog so the
messages you want go to the files you want.
Does that help at all?
Maybe your confusion is just that there are no "important" messages
from INN coming at LOG_WARNING -- they're all at LOG_ERR (the real
errors) and LOG_CRIT (the catastrophic errors).
> Use the source. I agree these don.t belong in warn.
Apparently some INN developer or other agrees with you...here's the
relevant section of the source (include/inn/options.h):
------------------------------------------------------------------------
----
/* There's no reason to make all of these #defines except possibly for
L_CC_CMD and even that's a stretch. Since we're logging to our own
distinguished log facility, provided that we spread things out
between a
reasonable variety of log levels, the sysadmin shouldn't have to
change
any of this. (Some of this is arguably wrong; L_NOTICE should be
LOG_NOTICE, for example.) */
/* Flags to use in opening the logs; some programs add LOG_PID. */
#define L_OPENLOG_FLAGS (LOG_CONS | LOG_NDELAY)
/* Fatal error, program is about to exit. */
#define L_FATAL LOG_CRIT
/* Log an error that might mean one or more articles get lost. */
#define L_ERROR LOG_ERR
/* Informational notice, usually not worth caring about. */
#define L_NOTICE LOG_WARNING
/* A protocol trace. */
#define L_TRACE LOG_DEBUG
/* All incoming control commands (ctlinnd, etc). */
#define L_CC_CMD LOG_INFO
------------------------------------------------------------------------
----
--
Jeffrey M. Vinocur
jeff at litech.org
More information about the inn-workers
mailing list