Bug 15857 - All backend log should honor global log level "log level = "
Summary: All backend log should honor global log level "log level = "
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Shweta Sodani
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-19 11:30 UTC by Shweta Sodani
Modified: 2025-05-21 11:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shweta Sodani 2025-05-19 11:30:58 UTC
Current backend logs like ringbuf and other are honoring global log level for following setting For example
    log level = 0
    logging = ringbuf@10

It is logging only level 0 to both file and ringbuf log. This is working as expected.

But if global log level has following sub class wide setting
    log level = 0 vfs:10
    logging = ringbuf@10

It is logging for level 10 for "vfs" and remaining all sub classes it is setting log  level 0.  This is happening only to file log.
For ringbuf log, it is sending log level 0 to all classes including "vfs" as well that is unexpected.
Ideally it should set log level same as file level to honor the global log level.
Comment 1 Shweta Sodani 2025-05-19 14:44:22 UTC
There is another case we should consider if log level setting are below 

     log level = 10
     logging = file@0 ringbuf@10

Currently it is setting log level "10" for both file log and ringbuf log and this is incorrect.
Expected result is file log level should override it with "0" since "0" < "10" (global log level) and set the log level for file log is "0" and whereas ringbuf log level is "10". 

Similarly another example for more clarification is 

     log level = 3
     logging = file@2 ringbuf@10

Here global log level is set to "3" ,but file log level is "2" i.e < "3", hence it can override and set it for "2" for file log.
But for ringbuf log level can not override from global log level because "10" >  "3" , hence it will set log level for ringbuf is "3".
Comment 2 Shweta Sodani 2025-05-19 15:05:38 UTC
I am preparing fix .