commit
aea5544645
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
||||||
# Ignore Gradle project-specific cache directory
|
.classpath
|
||||||
|
.settings
|
||||||
|
.project
|
||||||
.gradle
|
.gradle
|
||||||
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Ignore Gradle build output directory
|
|
||||||
build
|
build
|
||||||
|
bin
|
||||||
|
|
|
@ -2,7 +2,7 @@ plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'groovy'
|
id 'groovy'
|
||||||
id 'application'
|
id 'application'
|
||||||
id "com.github.johnrengelman.shadow" version "6.0.0"
|
id "com.github.johnrengelman.shadow" version "6.1.0"
|
||||||
id "net.nemerosa.versioning" version "2.14.0"
|
id "net.nemerosa.versioning" version "2.14.0"
|
||||||
id "nebula.ospackage" version "8.4.1"
|
id "nebula.ospackage" version "8.4.1"
|
||||||
}
|
}
|
||||||
|
@ -12,13 +12,13 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'info.picocli:picocli:4.5.1'
|
compile 'info.picocli:picocli:4.5.2'
|
||||||
annotationProcessor 'info.picocli:picocli-codegen:4.5.1'
|
annotationProcessor 'info.picocli:picocli-codegen:4.5.2'
|
||||||
|
|
||||||
implementation 'org.slf4j:slf4j-api:1.7.+'
|
implementation 'org.slf4j:slf4j-api:1.7.+'
|
||||||
runtimeOnly 'ch.qos.logback:logback-classic:1.+'
|
runtimeOnly 'ch.qos.logback:logback-classic:1.+'
|
||||||
|
|
||||||
testImplementation('org.spockframework:spock-core:2.0-M3-groovy-3.0')
|
testImplementation('org.spockframework:spock-core:2.0-M4-groovy-3.0')
|
||||||
testImplementation("org.slf4j:slf4j-simple:1.7.+")
|
testImplementation("org.slf4j:slf4j-simple:1.7.+")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ buildRpm {
|
||||||
|
|
||||||
buildDeb {
|
buildDeb {
|
||||||
dependsOn startShadowScripts
|
dependsOn startShadowScripts
|
||||||
requires('default-jre-headless')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
id = syslogd
|
id = syslogd
|
||||||
group = biz.nellemann.syslogd
|
group = biz.nellemann.syslogd
|
||||||
version = 1.0.4
|
version = 1.0.5
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.EventObject;
|
||||||
|
|
||||||
public class LogEvent extends EventObject {
|
public class LogEvent extends EventObject {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
private final String message;
|
private final String message;
|
||||||
|
|
||||||
public LogEvent(final Object source, final String message ) {
|
public LogEvent(final Object source, final String message ) {
|
||||||
|
@ -30,4 +31,5 @@ public class LogEvent extends EventObject {
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,9 +100,9 @@ public class TcpServer {
|
||||||
|
|
||||||
private synchronized void sendEvent(String message) {
|
private synchronized void sendEvent(String message) {
|
||||||
LogEvent event = new LogEvent( this, message );
|
LogEvent event = new LogEvent( this, message );
|
||||||
Iterator listeners = eventListeners.iterator();
|
Iterator<LogListener> listeners = eventListeners.iterator();
|
||||||
while( listeners.hasNext() ) {
|
while( listeners.hasNext() ) {
|
||||||
( (LogListener) listeners.next() ).onLogEvent( event );
|
listeners.next().onLogEvent( event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ public class UdpServer extends Thread {
|
||||||
|
|
||||||
private synchronized void sendEvent(String message) {
|
private synchronized void sendEvent(String message) {
|
||||||
LogEvent event = new LogEvent( this, message);
|
LogEvent event = new LogEvent( this, message);
|
||||||
Iterator listeners = eventListeners.iterator();
|
Iterator<LogListener> listeners = eventListeners.iterator();
|
||||||
while( listeners.hasNext() ) {
|
while( listeners.hasNext() ) {
|
||||||
( (LogListener) listeners.next() ).onLogEvent( event );
|
listeners.next().onLogEvent( event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue