More narrow output of application in stdout message printer.
This commit is contained in:
parent
c7fc3a594c
commit
058198003b
|
@ -4,7 +4,7 @@ plugins {
|
|||
id 'application'
|
||||
id "com.github.johnrengelman.shadow" version "6.1.0"
|
||||
id "net.nemerosa.versioning" version "2.14.0"
|
||||
id "nebula.ospackage" version "8.4.2"
|
||||
id "nebula.ospackage" version "8.5.2"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
id = syslogd
|
||||
group = biz.nellemann.syslogd
|
||||
version = 1.0.12
|
||||
version = 1.0.13
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.regex.Pattern;
|
|||
|
||||
@Command(name = "syslogd",
|
||||
mixinStandardHelpOptions = true,
|
||||
description = "Syslog Server",
|
||||
versionProvider = biz.nellemann.syslogd.VersionProvider.class)
|
||||
public class Application implements Callable<Integer>, LogListener {
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SyslogPrinter {
|
|||
StringBuilder sb = new StringBuilder(msg.timestamp.toString());
|
||||
sb.append(String.format(" [%8.8s.%-6.6s] ", msg.facility, msg.severity));
|
||||
sb.append(String.format(" %-16.16s ", msg.hostname));
|
||||
sb.append(String.format(" %-32.32s ", msg.application));
|
||||
sb.append(String.format(" %-16.16s ", msg.application));
|
||||
sb.append(msg.message);
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class SyslogPrinter {
|
|||
|
||||
sb.append(String.format(" [%8.8s.%-6.6s] ", msg.facility, msg.severity)).append(Ansi.RESET);
|
||||
sb.append(Ansi.BLUE).append(String.format(" %-16.16s ", msg.hostname)).append(Ansi.RESET);
|
||||
sb.append(Ansi.CYAN).append(String.format(" %-32.32s ", msg.application)).append(Ansi.RESET);
|
||||
sb.append(Ansi.CYAN).append(String.format(" %-16.16s ", msg.application)).append(Ansi.RESET);
|
||||
sb.append(msg.message);
|
||||
|
||||
return sb.toString();
|
||||
|
|
|
@ -15,7 +15,7 @@ public class UdpClient {
|
|||
private InetAddress address;
|
||||
private final Integer port;
|
||||
|
||||
public UdpClient(String host, Integer port) throws UnknownHostException, SocketException {
|
||||
public UdpClient(String host, Integer port) {
|
||||
|
||||
try {
|
||||
this.address = InetAddress.getByName(host);
|
||||
|
|
|
@ -19,7 +19,6 @@ class SyslogParserRfc3164Test extends Specification {
|
|||
syslogParser = new SyslogParserRfc3164();
|
||||
}
|
||||
|
||||
|
||||
void "test rfc3164 aix/vios message"() {
|
||||
|
||||
setup:
|
||||
|
|
Loading…
Reference in a new issue