On Sat, 9 Jan 2016, Andrew Morgan wrote:
> I recently upgraded from Samba v3.6.25 to v4.3.3. After the upgrade, I
> realized I should change my smb.conf because the syslog parameters are
> deprecated. My old parameters were:
>
> log level = 1
> syslog = 6
> syslog only = yes
>
> Also, I built Samba with --with-syslog-facility=LOG_LOCAL7.
>
> I'm having trouble replicating the same configuration with v4.3.3. The
> syslog facility configure option was removed, so I'm not sure how to
specify
> the facility. It uses LOG_DAEMON. Is there a way to specify the syslog
> facility?
>
> My configuration now is:
>
> log level = 1
> logging = syslog at 1
>
> With the old configuration, my log mostly contained connect/disconnect
lines,
> such as this:
>
> Jan 9 00:10:47 chernobyl smbd[18850]: [ID 702911 local7.warning]
[2016/01/09
> 00:10:47.965695, 1] smbd/service.c:1114(make_connection_snum)
> Jan 9 00:10:47 chernobyl smbd[18850]: [ID 702911 local7.warning]
> desktop-8iq6iou (10.249.230.47) connect to service klimanf initially as
user
> klimanf (uid=88308, gid=300) (pid 18850)
> Jan 9 00:11:13 chernobyl smbd[18850]: [ID 702911 local7.warning]
[2016/01/09
> 00:11:13.416222, 1] smbd/service.c:1378(close_cnum)
> Jan 9 00:11:13 chernobyl smbd[18850]: [ID 702911 local7.warning]
> desktop-8iq6iou (10.249.230.47) closed connection to service klimanf
>
> But these aren't logged anymore at log level = 1. At log level = 2, I
get
> the connect/disconnect lines, but I also get log entries for every file
that
> is opened, log entries from loadparm, stuff about authentication, and more.
> Too much detail! :)
>
> Does anyone have recommended log settings or know how I can replicate the
old
> behavior?
Answering my own email...
There are no hooks to set the syslog facility. You have to edit
lib/util/debug.c to change it.
Also, the debug level for the connect/disconnect statement was changed
from 1 to 2 at some point. Unfortunately, that DEBUG statement was not
classed, so I have to use "log level = 2" to get it at all, which adds
a
bunch of other debug output I don't want. I'll patch the code to change
that DEBUG statements to use log level 1.
Andy