noveogroup / android-logger

Useful logger for Android based on standard android.util.Log class. Simple lightweight (< 50 Kb) implementation of SLF4J API. Easy but powerful configuration via properties file and some additional helpful logging methods. Easy analogue of popular log4j library.

Home Page:https://noveogroup.github.io/android-logger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add isEnabled methods

igelgrun opened this issue · comments

  • Log.isVerboseEnabled()
  • Log.isDebugEnabled()
    ... etc ...

I use your library for logging and I could not disable the logging in props.
Imp classes:
import com.noveogroup.android.log.Logger;
import com.noveogroup.android.log.LoggerManager;
import com.noveogroup.android.log.Log;
Add File \ src \ main \ res \ android-logger.propertis
Props:
root= ASSERT:MyApplication
com.exmpl.myexceptionhandler= ASSERT:MyApplication-Database
com.exmpl.myexceptionhandler=ASSERT:MyApplication-UI
Also tried using this props
root= VERBOSE:MyApplication
com.exmpl.myexceptionhandler= VERBOSE:MyApplication-Database
com.exmpl.myexceptionhandler= VERBOSE:MyApplication-UI
But all From Log.i, Log.e are displayed in both cases and Log.isEnabled(Logger.Level.ERROR) always true.
How can I disable the logs?

Hello,

There are two mistakes:

  1. File "android-logger.propertis" should be "android-logger.properties"
  2. Property "com.exmpl.myexceptionhandler" is configured twice, so "MyApplication-UI" replaces "MyApplication-Database".

Hope it helps you.

is<Level>Enabled() methods implemented in 2f4671d