Replace logback w. slf4j-simple to reduce size.
This commit is contained in:
parent
7e8f49edbb
commit
c20137db35
11
build.gradle
11
build.gradle
|
@ -12,10 +12,10 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
annotationProcessor 'info.picocli:picocli-codegen:4.5.2'
|
annotationProcessor 'info.picocli:picocli-codegen:4.6.0'
|
||||||
implementation 'info.picocli:picocli:4.5.2'
|
implementation 'info.picocli:picocli:4.6.0'
|
||||||
implementation 'org.slf4j:slf4j-api:1.7.+'
|
implementation 'org.slf4j:slf4j-api:1.7.30'
|
||||||
runtimeOnly 'ch.qos.logback:logback-classic:1.+'
|
runtimeOnly 'org.slf4j:slf4j-simple:1.7.30'
|
||||||
|
|
||||||
testImplementation('org.spockframework:spock-core:2.0-M4-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.+")
|
||||||
|
@ -74,3 +74,6 @@ jar {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = 1.8
|
||||||
|
targetCompatibility = 1.8
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
id = syslogd
|
id = syslogd
|
||||||
group = biz.nellemann.syslogd
|
group = biz.nellemann.syslogd
|
||||||
version = 1.0.6
|
version = 1.0.7
|
||||||
|
|
|
@ -21,7 +21,6 @@ import java.io.InputStreamReader;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class TcpServer {
|
public class TcpServer {
|
||||||
|
|
4
src/main/resources/simplelogger.properties
Normal file
4
src/main/resources/simplelogger.properties
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
org.slf4j.simpleLogger.showDateTime=true
|
||||||
|
org.slf4j.simpleLogger.showShortLogName=true
|
||||||
|
org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss.SSS
|
||||||
|
org.slf4j.simpleLogger.levelInBrackets=true
|
|
@ -32,6 +32,20 @@ class SyslogParserTest extends Specification {
|
||||||
msg.application == "padmin"
|
msg.application == "padmin"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void "test another rfc3164 aix/vios message"() {
|
||||||
|
|
||||||
|
setup:
|
||||||
|
def input = "<13>Dec 18 10:09:22 Message forwarded from p924vio1: root: [errnotify] seq: 24266 - AA8AB241 1218100920 T O OPERATOR OPERATOR NOTIFICATION"
|
||||||
|
|
||||||
|
when:
|
||||||
|
SyslogMessage msg = SyslogParser.parseRfc3164(input)
|
||||||
|
|
||||||
|
then:
|
||||||
|
msg.message == "[errnotify] seq: 24266 - AA8AB241 1218100920 T O OPERATOR OPERATOR NOTIFICATION"
|
||||||
|
msg.hostname == "p924vio1"
|
||||||
|
msg.application == "root"
|
||||||
|
}
|
||||||
|
|
||||||
void "test rfc3164 normal message"() {
|
void "test rfc3164 normal message"() {
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
|
|
Loading…
Reference in a new issue