syslog problems

Christopher R. Hertel crh at
Tue Dec 1 20:32:10 GMT 1998

The code is the same going back to 1.9.18, before I moved it into its own
module.  I think that the real problem is the wording in the man page
(i.e., good catch).

It should read something like this: 

	Samba debug messages are mapped to the system syslog logging
	levels. Samba debug level zero maps onto syslog LOG_ERR, debug
	level one maps onto LOG_WARNING, debug level two maps to
	LOG_NOTICE, debug level three maps onto LOG_INFO.  All higher
	levels are mapped to LOG_DEBUG. 

	This paramter sets the threshold for sending messages to syslog. 
	Only messages with debug level less than this value will be sent 
	to syslog.

This seems reasonable.  The mapping should probably be constant, but you 
may not want to have your syslog file filled up with debug messages (esp. 
if you also have debug logs).

There are also a number of #defines that come into play.  You won't get 
any syslog messages unless you run configure with --with-syslog.

Chris -)-----

> >From smb.conf.5 (syslog):
> parameter sets the threshold for doing the mapping, all Samba debug messages
> above this threshold are mapped to syslog LOG_DEBUG messages.
> reality (lib/debug.c)
>   if( syslog_level < lp_syslog() )
>     {
>        do syslog stuff
>     }
> That is, only messages with level < syslog ( = 1 by default) are going into
> syslog.
> Who's wrong?

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

More information about the samba-technical mailing list