aboutsummaryrefslogtreecommitdiff
path: root/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-30 15:10:15 +0700
committerGravatar Alexander Alexeev2016-11-30 15:10:15 +0700
commit1d837a835c04078ec66325e9fb9de21ac401874e (patch)
tree428217d2c617b9caf2eb6d42a7716789881d0937 /juick-crosspost/src/main/java/com/juick/components/Crosspost.java
parentb45c000ed478f2407288aab1532425288f998689 (diff)
prevent string concatenation for disabled loggers
Diffstat (limited to 'juick-crosspost/src/main/java/com/juick/components/Crosspost.java')
-rw-r--r--juick-crosspost/src/main/java/com/juick/components/Crosspost.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
index fb6dd7d5..c39898f2 100644
--- a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
+++ b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
@@ -128,7 +128,7 @@ public class Crosspost implements AutoCloseable {
return false;
}
- logger.info("FB: #" + jmsg.getMid());
+ logger.info("FB: #{}", jmsg.getMid());
String status = getMessageHashTags(jmsg) + "\n" + jmsg.getText();
@@ -159,7 +159,7 @@ public class Crosspost implements AutoCloseable {
conn.disconnect();
} catch (Exception e) {
- logger.error("fbPost: " + e.getMessage(), e);
+ logger.error("fbPost exception", e);
}
return ret;
}
@@ -170,7 +170,7 @@ public class Crosspost implements AutoCloseable {
return false;
}
- logger.info("VK: #" + jmsg.getMid());
+ logger.info("VK: #", jmsg.getMid());
String status = getMessageHashTags(jmsg) + "\n" + jmsg.getText() + "\nhttp://juick.com/" + jmsg.getMid();
@@ -196,7 +196,7 @@ public class Crosspost implements AutoCloseable {
conn.disconnect();
} catch (Exception e) {
- logger.error("vkPost: " + e.getMessage(), e);
+ logger.error("vkPost exception", e);
}
return ret;
}
@@ -209,7 +209,7 @@ public class Crosspost implements AutoCloseable {
String token = percentEncode(tokens.getLeft());
String token_secret = percentEncode(tokens.getRight());
- logger.info("TWITTER: #" + jmsg.getMid());
+ logger.info("TWITTER: #{}", jmsg.getMid());
String status = getMessageHashTags(jmsg) + jmsg.getText();
if (status.length() > 115) {
@@ -251,7 +251,7 @@ public class Crosspost implements AutoCloseable {
conn.disconnect();
} catch (Exception e) {
- logger.error("twitterPost: " + e.getMessage(), e);
+ logger.error("twitterPost exception", e);
}
return ret;
}
@@ -277,7 +277,7 @@ public class Crosspost implements AutoCloseable {
return Base64.encodeBase64String(rawHmac);
} catch (Exception e) {
- logger.error("twitterSignature: " + e.getMessage(), e);
+ logger.error("twitterSignature exception", e);
}
return null;
}