Update dependencies and build container.

This commit is contained in:
Mark Nellemann 2022-11-02 12:09:49 +01:00
parent 46b70502df
commit cf377adecd
7 changed files with 13 additions and 30 deletions

View file

@ -1,4 +1,4 @@
image: openjdk:8
image: eclipse-temurin:8-jdk
pipelines:
branches:

View file

@ -12,14 +12,14 @@ repositories {
}
dependencies {
annotationProcessor 'info.picocli:picocli-codegen:4.6.2'
annotationProcessor 'info.picocli:picocli-codegen:4.6.3'
implementation 'info.picocli:picocli:4.6.3'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'org.slf4j:slf4j-simple:1.7.36'
implementation 'org.slf4j:slf4j-api:2.0.3'
implementation 'org.slf4j:slf4j-simple:2.0.3'
testImplementation('org.spockframework:spock-core:2.0-groovy-3.0')
testImplementation 'org.slf4j:slf4j-api:1.7.36'
testRuntimeOnly('org.slf4j:slf4j-simple:1.7.36')
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
testImplementation 'org.slf4j:slf4j-api:2.0.3'
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.3'
}
application {
@ -80,5 +80,7 @@ jar {
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

View file

@ -1,3 +1,3 @@
id = syslogd
group = biz.nellemann.syslogd
version = 1.2.6
version = 1.2.7

View file

@ -20,7 +20,6 @@ import biz.nellemann.syslogd.net.*;
import biz.nellemann.syslogd.parser.SyslogParser;
import biz.nellemann.syslogd.parser.SyslogParserRfc3164;
import biz.nellemann.syslogd.parser.SyslogParserRfc5424;
import org.slf4j.impl.SimpleLogger;
import picocli.CommandLine;
import picocli.CommandLine.Command;
@ -79,7 +78,7 @@ public class Application implements Callable<Integer>, LogReceiveListener {
if(enableDebug) {
System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "DEBUG");
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "DEBUG");
}
if(rfc5424) {

View file

@ -15,9 +15,6 @@
*/
package biz.nellemann.syslogd;
import biz.nellemann.syslogd.msg.SyslogMessage;
import java.util.EventObject;
public class LogReceiveEvent extends EventObject {

View file

@ -16,16 +16,10 @@
package biz.nellemann.syslogd.parser;
import biz.nellemann.syslogd.msg.SyslogMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Instant;
public abstract class SyslogParser {
private final static Logger log = LoggerFactory.getLogger(SyslogParser.class);
public abstract SyslogMessage parse(final String input);
public abstract Instant parseTimestamp(final String dateString);
@ -38,11 +32,8 @@ public abstract class SyslogParser {
* @return
*/
public int getFacility(String pri) {
int priority = Integer.parseInt(pri);
int facility = priority >> 3;
//log.debug("getFacility() - " + pri + " => " + facility);
return facility;
}
@ -54,13 +45,9 @@ public abstract class SyslogParser {
* @return
*/
public int getSeverity(String pri) {
int priority = Integer.parseInt(pri);
int severity = priority & 0x07;
//log.debug("getSeverity() - " + pri + " => " + severity);
return severity;
}
}

View file

@ -21,11 +21,9 @@ import biz.nellemann.syslogd.msg.SyslogMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;