Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 995 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 995 Bytes

Static Badge GitHub repo size

SL4J Logback

A simple Java class that demonstrates logging at various levels (trace, debug, info, warn, error) using SLF4J. The project is managed using Maven and includes several dependencies for logging and JSON processing. The logback.xml file configures the logging behavior, including different appenders and their formats.

ConsoleAppender

Two examples are provided: CONSOLE_JSON: Logs in JSON format to the console, and CONSOLE_TXT: Logs in plain text format to the console.

FileAppender

Logs in plain text format to a file.

HttpAppender

A Custom HTTP appender for sending logs to an HTTP endpoint with a bearer token for authentication (src/main/java/javiergs/HttpAppender.java).

LogtailAppender

The LogtailAppender is a custom appender provided by the Logtail library for sending logs to BetterStack.com.