Skip to content

πŸ““ Examples of logging process using SL4J Logback apenders and encoders

License

Notifications You must be signed in to change notification settings

CSC3100/Tool-Logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.