Log level not respected

SendBird versions:

com.sendbird.sdk:sendbird-android-sdk:3.0.167
com.sendbird.sdk:uikit2.1.5

This is how I’m setting up the log level in my application

SendBirdUIKit.init(adapter, context)
SendBirdUIKit.setLogLevel(LogLevel.ERROR)

However I’m seing warning messages being logged to logcat

07-16 13:38:15.028  8257  8314 W SendBird: [13:38:15.028 Connection$1:onMessage():175] onMessage instance : [PONG] com.sendbird.android.Connection@6385ccd
07-16 13:38:15.031  8257  8332 W SendBird: [13:38:15.031 EventController$1:call():116] ++ result[PONG] runnable=null
07-16 13:38:30.031  8257  8314 W SendBird: [13:38:30.030 Connection$1:onMessage():175] onMessage instance : [PONG] com.sendbird.android.Connection@6385ccd
07-16 13:38:30.032  8257  8332 W SendBird: [13:38:30.032 EventController$1:call():116] ++ result[PONG] runnable=null

Note the W in the logcat message meaning this is a warning message. Warning messages should not be logged if LogLevel.ERROR is configured.

It will also be great to provide a mechanism to turn off logging completely.

Thanks

Hi, @robertoestivill
I am checking this issue.
We already have LogLevel.NONE. If you want to turn off logging, You can set
SendBirdUIKit.setLogLevel(LogLevel.NONE)

Thanks for the speedy response @Doo_Rim

UiKit 2.1.5 doesn’t seem to have a LogLevel.NONE value in the enum

@robertoestivill

Sorry, I gave you the wrong info!
The Log that you attached is the log from our Sendbird Chat SDK.
You need to use SendBird.setLoggerLevel(LogLevel.NONE); if you don’t want to see SendBird logs.

However, we have the old logs from Sendbird Chat SDK. The old logs will be shown although you set the log level.

I recommend using a filter.
UIKit logs have a default tag which is SBUIKIT.
Sendbird Chat SDK logs also have a default tag which is SendBird.

image

Hi @Doo_Rim thanks for the clarifications.

Sadly that doesn’t seem to be working either. I have configured both sdk’s to the minimum level possible

SendBirdUIKit.setLogLevel(SendBirdUIKit.LogLevel.ERROR)
SendBird.setLoggerLevel(LogLevel.NONE)

And I am still seeing SendBird logs

07-20 11:59:32.788 16562 16625 W SendBird: [11:59:32.787 Connection$1:onMessage():175] onMessage instance : [PONG] com.sendbird.android.Connection@e706990
07-20 11:59:32.794 16562 16645 W SendBird: [11:59:32.794 EventController$1:call():116] ++ result[PONG] runnable=null

While I could filter them out within the IDE or logcat, my original intention was to remove absolutely all the logging from the my application release build type. I would expect the libraries I used to be able to comply with this basic requirement.

Thanks again.

1 Like