From 6fb16cae19dd34d7f1cb9676af34cecd10525614 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 22 Dec 2015 16:55:13 +0300 Subject: more logging --- src/main/java/com/juick/CrosspostComponent.java | 3 +++ src/main/java/com/juick/PushComponent.java | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') 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"), -- cgit v1.2.3