Skip to content

Instantly share code, notes, and snippets.

View logback.groovy
import ch.qos.logback.core.ConsoleAppender
import codes.monkey.logging.BeanStalkPropertyDefiner
import codes.monkey.logging.LoggingTagsPropertyDefiner
import net.logstash.logback.appender.LoggingEventAsyncDisruptorAppender
import net.logstash.logback.stacktrace.ShortenedThrowableConverter
import codes.monkey.logging.TimestampFormatPropertyDefiner.CloudwatchLogstashEncoder
import groovy.json.JsonOutput
View logstash-logging-event.json
{
"@timestamp":"2016-07-21T14:00:10.389+1000",
"@version":1,
"message":"Started CloudwatchLoggingApplication in 1.97 seconds (JVM running for 3.463)",
"logger_name":"c.m.l.CloudwatchLoggingApplication",
"thread_name":"main",
"level":"INFO",
"level_value":20000
}
View build.gradle
dependencies {
ext {
logbackVersion = '1.1.6'
slf4jApiVersion = '1.7.15'
logStashLogbackEncoderVersion = '4.7'
}
compile("ch.qos.logback:logback-classic:$logbackVersion")
compile("ch.qos.logback:logback-core:$logbackVersion")
compile("ch.qos.logback:logback-access:$logbackVersion")
@monkey-codes
monkey-codes / gist:d2908935000c754c6b87aeecb176b069
Created Aug 8, 2016
Gradle dependencies to setup logstash logback
View gist:d2908935000c754c6b87aeecb176b069
dependencies {
ext {
logbackVersion = '1.1.6'
slf4jApiVersion = '1.7.15'
logStashLogbackEncoderVersion = '4.7'
}
...
compile("ch.qos.logback:logback-classic:$logbackVersion")
compile("ch.qos.logback:logback-core:$logbackVersion")
compile("ch.qos.logback:logback-access:$logbackVersion")