[PATCH] enable logging for early startup failures

Stefan Metzmacher metze at samba.org
Wed Apr 17 16:05:30 UTC 2019


Hi Ralph,


>>>> Do you know with what change this got lost?
>>>> This used to appear in the log files and recently noticed that this
>>>> information isn't available anymore (at least in 4.7), but it was
>>>> there before (at least in 3.6)
>>>>
>>>> For 'samba' it's still here, but smbd and winbind (and I guess nmbd)
>>>> don't print it into the log file anymore.
>>>>
>>>> I think we should fix that and restore what we had before.
>>>> Always using syslog (even if it's not configured) seems wrong to me.
>>>>
>>>> metze
>>>>
>>>
>>> I did some research and the the patch set dee2b95..72f1a2a changed the
>>> behavior. More precisely c89a33a07a 'debug: Use backends instead of
>>> explicitly logging to syslog or file' disabled the startup messages.
>>> To restore the original behavior it should be enough to call
>>> debug_set_settings() with "file" as value for parameter
>>> "logging_param". Please see attached patch set with this change in
>>> patch #3.
>>>
>>
>> One more thing: to completely restore the old behavior we probably have
>> to set the default value for "logging" to "file". Currently the default
>> value is empty.
> 
> Can you specify what the original behavior was?
> 
> Was it logging to a file only? If I look at the code in 4.1 it seems to
> me that we logged to syslog (if compiled with syslog support) and also
> to the file (unless syslog only was configured).

Ok, state.settings.syslog is 0 and state.settings.syslog_only = false
when we enter reopen_logs() before lp_loaded() returns true.

So the initial message (with loglevel >= 0, which means all) only went
to the log file and not to the syslog.

Can you file a bug report and add the url to the commit messages
and also push it through a gitlab pipeline?

Thanks!
metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190417/c371180e/signature.sig>


More information about the samba-technical mailing list