diff --git a/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java b/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java index 76133c0..ae208aa 100644 --- a/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java +++ b/src/main/java/cc/fascinated/bat/features/logging/LogFeature.java @@ -56,6 +56,15 @@ public class LogFeature extends Feature { * @return the formatted content */ public String formatContent(String content) { - return content.length() > 512 ? PasteUtils.uploadPaste(content).getUrl() : "\n```\n%s\n```".formatted(content); + if (content == null) { + return "No content"; + } + if (content.length() > 512) { + return "Content too long, [click here to view]("+PasteUtils.uploadPaste(content)+")"; + } + if (content.length() <= 32) { + return "`%s`".formatted(content); + } + return "\n```\n%s\n```".formatted(content); } }