summaryrefslogtreecommitdiff
path: root/master/src/main/java/com/orbekk/ConfigureLog4J.java
diff options
context:
space:
mode:
Diffstat (limited to 'master/src/main/java/com/orbekk/ConfigureLog4J.java')
-rw-r--r--master/src/main/java/com/orbekk/ConfigureLog4J.java18
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