From 3121d9ca9cabd3750637bab08ceb547cd6f7c050 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 19 Jun 2019 11:07:36 +0300 Subject: Short logger names --- src/main/java/com/juick/server/ActivityPubManager.java | 2 +- src/main/java/com/juick/server/KeystoreManager.java | 12 ++---------- src/main/java/com/juick/server/ServerManager.java | 4 +--- src/main/java/com/juick/server/SignatureManager.java | 2 +- src/main/java/com/juick/server/TelegramBotManager.java | 2 +- src/main/java/com/juick/server/XMPPManager.java | 2 +- src/main/java/com/juick/server/api/Service.java | 2 +- 7 files changed, 8 insertions(+), 18 deletions(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/juick/server/ActivityPubManager.java b/src/main/java/com/juick/server/ActivityPubManager.java index 400a63d4..38a853b4 100644 --- a/src/main/java/com/juick/server/ActivityPubManager.java +++ b/src/main/java/com/juick/server/ActivityPubManager.java @@ -50,7 +50,7 @@ import java.util.stream.Collectors; @Component public class ActivityPubManager implements ActivityListener, NotificationListener { - private static final Logger logger = LoggerFactory.getLogger(ActivityPubManager.class); + private static final Logger logger = LoggerFactory.getLogger("ActivityPub"); @Inject private SignatureManager signatureManager; @Inject diff --git a/src/main/java/com/juick/server/KeystoreManager.java b/src/main/java/com/juick/server/KeystoreManager.java index 61caba82..b1ce7a56 100644 --- a/src/main/java/com/juick/server/KeystoreManager.java +++ b/src/main/java/com/juick/server/KeystoreManager.java @@ -17,7 +17,7 @@ import java.util.Arrays; import java.util.stream.Collectors; public class KeystoreManager { - private static final Logger logger = LoggerFactory.getLogger("com.juick.server"); + private static final Logger logger = LoggerFactory.getLogger("ActivityPub"); private String keystorePassword; @@ -38,16 +38,8 @@ public class KeystoreManager { } } - public KeyStore getKeystore() { - return ks; - } - - public KeyManagerFactory getKeymanagerFactory() { - return kmf; - } - private KeyPair getKeyPair() { - Key privateKey = null; + Key privateKey; try { privateKey = ks.getKey("1", keystorePassword.toCharArray()); Certificate certificate = ks.getCertificate("1"); diff --git a/src/main/java/com/juick/server/ServerManager.java b/src/main/java/com/juick/server/ServerManager.java index 5e0baf6a..0963f9b8 100644 --- a/src/main/java/com/juick/server/ServerManager.java +++ b/src/main/java/com/juick/server/ServerManager.java @@ -47,10 +47,8 @@ import java.util.stream.Collectors; */ @Component public class ServerManager implements NotificationListener { - private static Logger logger = LoggerFactory.getLogger(ServerManager.class); + private static Logger logger = LoggerFactory.getLogger("Session"); - @Inject - private ObjectMapper jsonMapper; @Inject private MessagesService messagesService; @Inject diff --git a/src/main/java/com/juick/server/SignatureManager.java b/src/main/java/com/juick/server/SignatureManager.java index fc458533..36cc3796 100644 --- a/src/main/java/com/juick/server/SignatureManager.java +++ b/src/main/java/com/juick/server/SignatureManager.java @@ -38,7 +38,7 @@ import static com.juick.server.api.activity.model.Context.ACTIVITY_MEDIA_TYPE; @Component public class SignatureManager { - private static final Logger logger = LoggerFactory.getLogger(SignatureManager.class); + private static final Logger logger = LoggerFactory.getLogger("ActivityPub"); @Inject private KeystoreManager keystoreManager; @Inject diff --git a/src/main/java/com/juick/server/TelegramBotManager.java b/src/main/java/com/juick/server/TelegramBotManager.java index 54247076..0dc8b13d 100644 --- a/src/main/java/com/juick/server/TelegramBotManager.java +++ b/src/main/java/com/juick/server/TelegramBotManager.java @@ -70,7 +70,7 @@ import static com.juick.formatters.PlainTextFormatter.formatUrl; * Created by vt on 12/05/16. */ public class TelegramBotManager implements NotificationListener { - private static final Logger logger = LoggerFactory.getLogger(TelegramBotManager.class); + private static final Logger logger = LoggerFactory.getLogger("Telegram"); private TelegramBot bot; diff --git a/src/main/java/com/juick/server/XMPPManager.java b/src/main/java/com/juick/server/XMPPManager.java index 12021006..a41e6053 100644 --- a/src/main/java/com/juick/server/XMPPManager.java +++ b/src/main/java/com/juick/server/XMPPManager.java @@ -86,7 +86,7 @@ import java.util.concurrent.ExecutorService; */ public class XMPPManager implements NotificationListener { - private static final Logger logger = LoggerFactory.getLogger("com.juick.server.xmpp"); + private static final Logger logger = LoggerFactory.getLogger("XMPP"); private ExternalComponent xmpp; @Inject diff --git a/src/main/java/com/juick/server/api/Service.java b/src/main/java/com/juick/server/api/Service.java index 791e09ce..144b5bec 100644 --- a/src/main/java/com/juick/server/api/Service.java +++ b/src/main/java/com/juick/server/api/Service.java @@ -40,7 +40,7 @@ import java.util.*; @Controller public class Service { - private static Logger logger = LoggerFactory.getLogger(Service.class); + private static Logger logger = LoggerFactory.getLogger("Session"); @Inject private UserService userService; @Inject -- cgit v1.2.3