FileDocCategorySizeDatePackage
AndroidConfig.javaAPI DocAndroid 1.5 API1552Wed May 06 22:41:56 BST 2009com.android.internal.logging

AndroidConfig

public class AndroidConfig extends Object
Implements the java.util.logging configuration for Android. Activates a log handler that writes to the Android log.

Fields Summary
Constructors Summary
public AndroidConfig()
This looks a bit weird, but it's the way the logging config works: A named class is instantiated, the constructor is assumed to tweak the configuration, the instance itself is of no interest.

        super();
        
        try {
            Logger rootLogger = Logger.getLogger("");
            rootLogger.addHandler(new AndroidHandler());
            rootLogger.setLevel(Level.INFO);

            // Turn down logging in Apache libraries.
            Logger.getLogger("org.apache").setLevel(Level.WARNING);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    
Methods Summary