Bug 14698 - Daemon startup is logged as syslog level 3 (Error) but it's a success
Summary: Daemon startup is logged as syslog level 3 (Error) but it's a success
Status: RESOLVED DUPLICATE of bug 15377
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.13.7
Hardware: All Linux
: P5 minor (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-05 03:17 UTC by aguillotc
Modified: 2023-06-06 21:42 UTC (History)
1 user (show)

See Also:


Attachments
Samba logging level3 logs when starting up successfully. (4.13 KB, text/plain)
2021-05-05 03:17 UTC, aguillotc
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description aguillotc 2021-05-05 03:17:37 UTC
Created attachment 16605 [details]
Samba logging level3 logs when starting up successfully.

Rationale :
Samba seems to cheerfully log a successful startup sequence as an error log, Syslog priority 3. But everything is working good.
Attached is a typical log sequence during boot for Samba on my system.
Notice how the first two logs are Syslog level 6, and the last two are Syslog level 3.

This log Level 3 is causing some minor but visible artifacts in my system log reports, as it's technically an error.
It's showing red in formatted log outputs, appears when filtering Journald for errors, shows with warning signs in Cockpit GUI.


My findings : 
According to file : lib/util/become_daemon.c
(here : https://gitlab.com/samba-team/samba/-/blob/fd28e8aeb422fa99e3ea7f13a75ea93b76320b48/lib/util/become_daemon.c#L136)
the function is indeed using the macro DBG_ERR.

If I understand the README.Coding at "DEBUG statements" paragraph
(here: https://gitlab.com/samba-team/samba/-/blob/fd28e8aeb422fa99e3ea7f13a75ea93b76320b48/README.Coding.md)
as well as the fact that the usage of DBG_ERR here doesn't follow the usage in many other files where this macro is used solely for error reporting,


Suggestion: 
I suggest the function should be using instead one of the following macros : DBG_NOTICE, DBG_INFO, DBG_DEBUG,
to lower the error level to something less noticeable.
I don't know to which Syslog priorities those macros are related.


Cheers.
Comment 1 Björn Jacke 2023-06-06 21:42:16 UTC

*** This bug has been marked as a duplicate of bug 15377 ***