Bug 11036 - No option to set where debugging goes prior to calling smbc_new_context()
No option to set where debugging goes prior to calling smbc_new_context()
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
unspecified
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-07 08:36 UTC by Jakub Hrozek
Modified: 2015-01-07 10:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Hrozek 2015-01-07 08:36:25 UTC
libsmb offers the possibility to set up debugging using smbc_setOptionDebugToStderr() but only after a context has been established with smbc_new_context().

However, smbc_new_context() can still emit log messages, which, combined with "log level" setting in smb.conf might lead to stdout output which cannot be easily suppressed.

It would be better to offet some way to set up logging target prior to creating a new context -- via some "global" call like smbc_global_debug_to_stderr() or even some environment variable.
Comment 1 Jakub Hrozek 2015-01-07 08:36:52 UTC
btw see https://fedorahosted.org/sssd/ticket/2544 for a real-world consequence.
Comment 2 Jakub Hrozek 2015-01-07 10:34:19 UTC
I should also add that I'm fine with contributing a fix if there's a consensus if and how to fix the problem.