From 3a6d2d10718dc45c09ef011ba7d812b95daa31f7 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 18 Mar 2020 18:25:27 -0700 Subject: [PATCH] Fixed logging messages. --- src/main/java/net/thauvin/erik/mobibot/Mobibot.java | 4 ++-- src/main/java/net/thauvin/erik/mobibot/modules/Lookup.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/thauvin/erik/mobibot/Mobibot.java b/src/main/java/net/thauvin/erik/mobibot/Mobibot.java index c8875f2..1c7b44c 100644 --- a/src/main/java/net/thauvin/erik/mobibot/Mobibot.java +++ b/src/main/java/net/thauvin/erik/mobibot/Mobibot.java @@ -342,7 +342,7 @@ public class Mobibot extends PircBot { if (retries == MAX_RECONNECT) { if (logger.isDebugEnabled()) { logger.debug( - "Unable to reconnect to " + ircServer + " after " + MAX_RECONNECT + " retries.", ex); + "Unable to reconnect to {} after {} retries.", ircServer, MAX_RECONNECT, ex); } e.printStackTrace(System.err); @@ -1522,7 +1522,7 @@ public class Mobibot extends PircBot { twitterModule.post(twitterHandle, getName() + ' ' + ReleaseInfo.VERSION + " " + msg, true); } catch (ModuleException e) { if (logger.isWarnEnabled()) { - logger.warn("Failed to notify @" + twitterHandle + ": " + msg, e); + logger.warn("Failed to notify @{}: {}", twitterHandle, msg, e); } } }).start(); diff --git a/src/main/java/net/thauvin/erik/mobibot/modules/Lookup.java b/src/main/java/net/thauvin/erik/mobibot/modules/Lookup.java index f9df1af..3a019a6 100644 --- a/src/main/java/net/thauvin/erik/mobibot/modules/Lookup.java +++ b/src/main/java/net/thauvin/erik/mobibot/modules/Lookup.java @@ -177,7 +177,7 @@ public final class Lookup extends AbstractModule { } } catch (IOException ioe) { if (bot.getLogger().isDebugEnabled()) { - bot.getLogger().debug("Unable to perform whois IP lookup: " + args, ioe); + bot.getLogger().debug("Unable to perform whois IP lookup: {}", args, ioe); } bot.send("Unable to perform whois IP lookup: " + ioe.getMessage());