Web lists-archives.com

Re: [Samba] How to print the log in socket_wrapper.c




On Thu, 2017-03-02 at 09:50 +0000, Chenyehua via samba wrote:
> Hi folks
> I want to print the log in socket_wrapper.c to have a better view of the read or write socket
> behavior.
> I find that there are four debug levels:
> SWRAP_LOG_ERROR
>                 SWRAP_LOG_WARN
>                 SWRAP_LOG_DEBUG
>                 SWRAP_LOG_TRACE
>          So:
> Where and How to set those debug levels?
> Where can I find the log?
> Or:
> Are there any other ways to print the log?(I directly added the “printf” code, but it did not not
> work -_-!)

You can set the environment variable SOCKET_WRAPPER_DEBUGLEVEL to required level as described in the
man page for socket_wrapper(1) under the section named "ENVIRONMENT VARIABLES".

. . .
SOCKET_WRAPPER_DEBUGLEVEL
    If you need to see what is going on in socket_wrapper itself or try to find a bug, you can
    enable logging support in socket_wrapper if you built it with debug symbols.

               0 = ERROR
               1 = WARNING
               2 = DEBUG
               3 = TRACE
. . .

It will then display logs to stderr.


> Best regards
> Thanks
> 
> --------------------------------------------------------------------------------------------------
> -----------------------------------
> 本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
> 邮件!
> This e-mail and its attachments contain confidential information from H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba