RFC: PATCH: client tools option -l|--log-basename not working

Noel Power nopower at suse.com
Tue Aug 22 09:24:01 UTC 2017


Anything more I can do to move this along ?

Noel
On 07/07/17 17:41, Noel Power wrote:
> And now with s4 bits, please have a look
>
> Noel
> On 29/06/17 15:15, Noel Power wrote:
>> Hi Andreas
>> thanks actually besides the fuse example I only wanted to include the s3
>> ones at the moment and this one is really s4 (well the cmd name built is
>> nmblookup4) so please discard this hunk (I deleted it see attached)
>>
>> thanks
>> Noel
>>
>> On 29/06/17 15:03, Andreas Schneider wrote:
>>> On Thursday, 29 June 2017 14:14:28 CEST Noel Power via samba-technical wrote:
>>>> Hi,
>>>>
>>>> I noticed smbclient wasn't logging to file with the '---log-basename'
>>>> option, a log file was created but no log messages reached it,  the log
>>>> output was nowhere to be seen. After some investigation I came up with
>>>> the first patch in the series below (basically it automagically calls
>>>> reopen_logs as setup_logging is already called for you) However upon
>>>> checking some other client tools I found that these similarly weren't
>>>> obeying the '---log-basename' option. The following patches fix the
>>>> issues seen all the s3/utils client tools. I suspect there are more
>>>> client tools (s4 etc) in the same boat. However I wait to deal with
>>>> those (assuming they exist) just to avoid unnecessarily changing alot of
>>>> stuff if the approach here isn't correct or optimal.
>>> Thanks for the patch Noel!
>>>
>>> I think in the following hunk you want to remove the lp_set_cmdline() ...
>>>
>>> diff --git a/libcli/nbt/tools/nmblookup.c b/libcli/nbt/tools/nmblookup.c
>>> index e5fa57366e6..8a00aee2d2d 100644
>>> --- a/libcli/nbt/tools/nmblookup.c
>>> +++ b/libcli/nbt/tools/nmblookup.c
>>> @@ -327,7 +327,11 @@ int main(int argc, const char *argv[])
>>>  		POPT_COMMON_SAMBA
>>>  		{ 0, 0, 0, 0 }
>>>  	};
>>> -	
>>> +
>>> +	setup_logging( "nmblookup", DEBUG_DEFAULT_STDERR);
>>> +	/* set default debug level to 1 regardless of what smb.conf sets */
>>> +//	lp_set_cmdline("log level", "1");
>>> +
>>>
>>>
>> Noel
>




More information about the samba-technical mailing list