diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 15:34:55 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 15:34:55 +0100 |
commit | 9a554911174e096b95e99527eac04627400c41ba (patch) | |
tree | 2d36439a69ded1ca54051e3a1636106423c3d7c9 /master/src/main/java/com/orbekk/ConfigureLog4J.java |
Initial import of maven projects.
jsonrpc - Common classes.
rpctest - A small xmlrpc project.
master - Android application containing broadcast code and ping service.
Diffstat (limited to 'master/src/main/java/com/orbekk/ConfigureLog4J.java')
-rw-r--r-- | master/src/main/java/com/orbekk/ConfigureLog4J.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/master/src/main/java/com/orbekk/ConfigureLog4J.java b/master/src/main/java/com/orbekk/ConfigureLog4J.java new file mode 100644 index 0000000..e6b1ac5 --- /dev/null +++ b/master/src/main/java/com/orbekk/ConfigureLog4J.java @@ -0,0 +1,18 @@ +package com.orbekk; +import org.apache.log4j.Level; +import android.os.Environment; +import de.mindpipe.android.logging.log4j.LogConfigurator; + +public class ConfigureLog4J { + static { + final LogConfigurator logConfigurator = new LogConfigurator(); + + logConfigurator.setFileName(Environment.getExternalStorageDirectory() + "myapp.log"); + logConfigurator.setRootLevel(Level.DEBUG); + logConfigurator.setUseLogCatAppender(true); + // Set log level of a specific logger + // logConfigurator.setLevel("org.apache", Level.ERROR); + logConfigurator.configure(); + System.err.println("GOT HERE."); + } +}
\ No newline at end of file |