aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-12-22 16:55:13 +0300
committerGravatar Vitaly Takmazov2015-12-22 16:55:13 +0300
commit6fb16cae19dd34d7f1cb9676af34cecd10525614 (patch)
treecf4681c034783a28d860bd188c59b10b8a653d26 /src/main/java/com/juick
parent01ed3f4e5024b746bf3de54c4517fcd15d4fecfb (diff)
more logging
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/CrosspostComponent.java3
-rw-r--r--src/main/java/com/juick/PushComponent.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/juick/CrosspostComponent.java b/src/main/java/com/juick/CrosspostComponent.java
index 4c6a5002..0b5a5bc2 100644
--- a/src/main/java/com/juick/CrosspostComponent.java
+++ b/src/main/java/com/juick/CrosspostComponent.java
@@ -43,6 +43,7 @@ import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Level;
+import java.util.logging.LogManager;
import java.util.logging.Logger;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
@@ -79,6 +80,8 @@ public class CrosspostComponent implements ServletContextListener, Stream.Strea
Properties conf = new Properties();
conf.load(sce.getServletContext().getResourceAsStream("WEB-INF/juick.conf"));
+ LogManager.getLogManager().readConfiguration(
+ sce.getServletContext().getResourceAsStream("WEB-INF/logging.properties"));
twitter_consumer_key = conf.getProperty("twitter_consumer_key", "");
twitter_consumer_secret = conf.getProperty("twitter_consumer_secret", "");
diff --git a/src/main/java/com/juick/PushComponent.java b/src/main/java/com/juick/PushComponent.java
index f2c1ee74..ab655791 100644
--- a/src/main/java/com/juick/PushComponent.java
+++ b/src/main/java/com/juick/PushComponent.java
@@ -51,6 +51,7 @@ import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Level;
+import java.util.logging.LogManager;
import java.util.logging.Logger;
/**
@@ -77,6 +78,8 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
Properties conf = new Properties();
try {
conf.load(sce.getServletContext().getResourceAsStream("WEB-INF/juick.conf"));
+ LogManager.getLogManager().readConfiguration(
+ sce.getServletContext().getResourceAsStream("WEB-INF/logging.properties"));
GCMSender = new Sender(conf.getProperty("gcm_key"));
setupSql(conf.getProperty("mysql_host"), conf.getProperty("mysql_username"),