From c555f91794f9da7d8e629bc24ad948eff9f3c857 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Wed, 7 Oct 2020 12:50:51 +0200 Subject: [PATCH] Formatting cleanup. --- .../java/biz/nellemann/syslogd/SyslogMessage.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/biz/nellemann/syslogd/SyslogMessage.java b/src/main/java/biz/nellemann/syslogd/SyslogMessage.java index b67de08..23476a7 100644 --- a/src/main/java/biz/nellemann/syslogd/SyslogMessage.java +++ b/src/main/java/biz/nellemann/syslogd/SyslogMessage.java @@ -55,9 +55,9 @@ public class SyslogMessage { public String toString() { StringBuilder sb = new StringBuilder(); sb.append(timestamp.toString()); - sb.append(String.format(" [%6.6s.%-6.6s] ", facility, severity)); - sb.append(String.format(" %-24.24s ", hostname)); - sb.append(String.format(" %-32.43s ", application)); + sb.append(String.format(" [%8.8s.%-6.6s] ", facility, severity)); + sb.append(String.format(" %-16.16s ", hostname)); + sb.append(String.format(" %-32.32s ", application)); sb.append(message); return sb.toString(); } @@ -76,9 +76,9 @@ public class SyslogMessage { sb.append(Ansi.GREEN); } - sb.append(String.format(" [%6.6s.%-6.6s] ", facility, severity)).append(Ansi.RESET); - sb.append(Ansi.BLUE).append(String.format(" %-24.24s ", hostname)).append(Ansi.RESET); - sb.append(Ansi.CYAN).append(String.format(" %-32.32s ", application)).append(Ansi.RESET); + sb.append(String.format(" [%8.8s.%-6.6s] ", facility, severity)).append(Ansi.RESET); + sb.append(Ansi.BLUE).append(String.format(" %-16.16s ", hostname)).append(Ansi.RESET); + sb.append(Ansi.CYAN).append(String.format(" %-32.32s ", application)).append(Ansi.RESET); sb.append(message); return sb.toString();