logstash-logback-spring-boot-starter

Library for Logstash Logging in Spring Boot

License

License

Categories

Categories

Spring Boot Container Microservices Logback Application Layer Libs Logging Logstash
GroupId

GroupId

io.github.bhuwanupadhyay
ArtifactId

ArtifactId

logstash-logback-spring-boot-starter
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

logstash-logback-spring-boot-starter
Library for Logstash Logging in Spring Boot
Project URL

Project URL

https://github.com/BhuwanUpadhyay/logstash-logback-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/BhuwanUpadhyay/logstash-logback-spring-boot-starter

Download logstash-logback-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.bhuwanupadhyay/logstash-logback-spring-boot-starter/ -->
<dependency>
    <groupId>io.github.bhuwanupadhyay</groupId>
    <artifactId>logstash-logback-spring-boot-starter</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.bhuwanupadhyay/logstash-logback-spring-boot-starter/
implementation 'io.github.bhuwanupadhyay:logstash-logback-spring-boot-starter:1.0.3'
// https://jarcasting.com/artifacts/io.github.bhuwanupadhyay/logstash-logback-spring-boot-starter/
implementation ("io.github.bhuwanupadhyay:logstash-logback-spring-boot-starter:1.0.3")
'io.github.bhuwanupadhyay:logstash-logback-spring-boot-starter:jar:1.0.3'
<dependency org="io.github.bhuwanupadhyay" name="logstash-logback-spring-boot-starter" rev="1.0.3">
  <artifact name="logstash-logback-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.bhuwanupadhyay', module='logstash-logback-spring-boot-starter', version='1.0.3')
)
libraryDependencies += "io.github.bhuwanupadhyay" % "logstash-logback-spring-boot-starter" % "1.0.3"
[io.github.bhuwanupadhyay/logstash-logback-spring-boot-starter "1.0.3"]

Dependencies

compile (2)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
net.logstash.logback : logstash-logback-encoder jar 6.4

provided (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-autoconfigure jar 2.3.4.RELEASE
org.springframework.boot : spring-boot-configuration-processor jar 2.3.4.RELEASE

test (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.3.4.RELEASE
org.junit.jupiter : junit-jupiter jar 5.6.2

Project Modules

There are no modules declared in this project.

Logstash Logging in Spring Boot Twitter

Maven Central Github Action Quality Gate Status Maintainability Rating Reliability Rating

Usages

This library helps to send logs automatically to Logstash.

Features

The main feature provided by logstash-logback-spring-boot-starter:

  • automatically configured the spring boot application to send logs to Logstash.

Getting started

Available on Maven Central.

<dependency>
  <groupId>io.github.bhuwanupadhyay</groupId>
  <artifactId>logstash-logback-spring-boot-starter</artifactId>
  <version>1.0.3</version>
</dependency>

Auto-configuration enable logstash logging automatically, and connected with logstash server url localhost:5044.

In case if you have to change logstash server url, override following properties:

boot:
  logstash:
    destination: localhost:5044

By default custom fields are:

{ "appname" : "<spring.application.name>" }

To disable logstash logging, override following properties:

boot:
  logstash:
    enabled: false

All configuration properties:

boot:
  logstash:
    destination: localhost:5044
    enabled: true
    key-store-location: keystore/trust.pk
    key-store-password: 12345  
    custom-fields: |-
      {"appname":"${spring.application.name}", "env": "${spring.profiles.active}"}
    queue-size: 512

Demo

Greeting Service

Thank you!

Versions

Version
1.0.3
1.0.2
1.0.1
1.0.0