Skip to content

techatspree/androlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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. Moreover Androlog supports reporting allowing
you to send report about errors... Even if the Google Marketplace supports such reporting, those reports does not contain
enough information (no log, device info...).

This is why you should use Androlog.

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)