[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimization of log levels


On Thursday 10 April 2014 10:41:20 Aartih wrote:
> Hi,

Hey,

> We have registered callbacks for fetching the debug/trace from libssh in our
> server side interface code, and for configuring the log level we use the
> API ssh_set_log_level(SSH_LOG_LEVEL).
> 
> When the log level is set to 1 we observe all the warnings would be
> displayed. Also because of this #define of SSH_LOG_RARE to SSH_LOG_WARNING
> dumps us the logs of SSH_LOG_RARE in level 1 .
> 
> Normally when we establish a SSH session we get around 13 messages when the
> log level is set to 1. Further if we enter some commands/do some operation
> the count increases, and floods more number of messages which actually
> doesnot fall under warning conditions. Few informational messages are also
> logged under this level 1, which floods the log books that we are
> implementing.
> 
> For example in functions
> channel_default_bufferize : SSH_LOG(SSH_LOG_RARE,
>       "placing %d bytes into channel buffer (stderr=%d)", len, is_stderr);
> 
> channel_write_common:  SSH_LOG(SSH_LOG_RARE,
>         "channel_write wrote %ld bytes", (long int) effectivelen);
> 
> The above log messages occur very frequently when we set the level to 1
> establish the session,
> 
> The above informational messages also come under warning, And we feel that
> this SSH_LOG_RARE has to be made equivalent to either levels 2 or 3, since
> the messages are flooding the log books and we fear the possibility of
> missing other important messages.

The logging need to be evaluated and cleaned up like you did. I think these 
messages should be SSH_LOG_PROTOCOL.

Maybe delete the define SSH_LOG_RARE and fix all log messages. The old defines 
should be removed in libssh 0.8.


Patches are welcome in git format-patch:

http://www.git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Public-Large-Project

:)

Cheers,


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


References:
Optimization of log levelsAartih <aarthit2014@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org