forked from techatspree/androlog
-
Notifications
You must be signed in to change notification settings - Fork 0
androlog is a customizable Log replacement for Android
License
cescoffier/androlog
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Android provides an utility class to log messages. The android.util.Log provides all the required functions. Unfortunately, there is no easy way to alter the default log level from within your application or disable logging altogether, although this is crucial before releasing an application. This is why you should use androlog, which provides a class Log with the exact same API, but offers additional methods: - deactivateLogging() : Disable all logging. - activateLogging() : (Re-)activate logging. - setDefaultLogLevel(int logLevel) : Set the default log level. Any level below the default level will not be logged (per default). You can also set all log levels separately for each tag / logger (more on tags below). By default, all logging is disabled. To enable it programmatically, use the activateLogging() method. You can also use properties file on the SDCard to configure the loggers. File base configuration ----------------------- Create a file in the sdcard root directory. Inside, define a property: androlog.active = true The Log class provides several log levels. For each level, a method is associated: ERROR : Log.e WARN : Log.w INFO : Log.i DEBUG : Log.d VERBOSE : Log.v The file name depends on the Log.init method that you call: - init() : the file must be named androlog.properties. - init(a_name) : the file must be named a_name.properties - init(android_context) : the file must be named package.properties where package is your application package. Tag Computation --------------- Androlog defines several methods for each log level. i(tag, message) : tag is the tag... i(this, message) : the tag is the qualified class name of this i(message) : the tag is computed from the current tread stack Credits ------- Androlog is an open source project licensed under the Apache License 2.0. IT is founded by akquinet (http://akquinet.de/en)
About
androlog is a customizable Log replacement for Android
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published