Skip to content

Instantly share code, notes, and snippets.


Benjamen Pyle benbpyle

View GitHub Profile
View logstash-tcp.conf
input {
tcp {
port => "5000"
codec => json_lines
output {
stdout {}
View logback-tcp.xml
<?xml version="1.0" encoding="UTF-8"?>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
%green(%d{yyyy-MM-dd HH:mm:ss}) %magenta([%thread]) %blue(%-5level) %yellow(%logger{36}) - %msg%n
benbpyle /
Created Mar 23, 2019
SLF4J logging example
package com.logging-example
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
You can’t perform that action at this time.