Skip to content
/ sawmill Public

An easy to use lightweight universal logging backend for JUL, Log4J, SLF4J and JCL - no dependencies, no bridges

License

Notifications You must be signed in to change notification settings

xzel23/sawmill

Repository files navigation

Project Sawmill

  • SLB4J: A lightweight, zero-dependencies logging backend for Java.
  • SLB4J-EXT: Extensions for SLB4J, for example LogBuffer, and UI components for JavaFX and Swing.

All projects use Java 21 as baseline.

SLB4J (codename Lumberjack)

SLB4J is a lightweight, zero-dependencies logging backend for Java.

Features

  • zero dependencies
  • Log4J pattern language
  • colored console output (optional)
  • log rotation
  • hierarchical definition of log levels
  • lazy message formatting, i.e., messages are only formatted when needed
  • MDC
  • Marker
  • Location (supported for all frontends)

How to use

  • Do not include any other logging backend (log4j-core, logback, etc.)
  • Do not add any logging bridge handler
  • Add the single SLB4J dependency to your code.
  • Add SLB4J.init() in a static initializer block of the class containing your main() method.
  • Provide a logging.properties file to configure the logging backend. (optional)

Configuration

TODO describe format of logging.properties and runtime configuration.

Performance

TODO: Implement and benchmarks and add results for slb4j and other backends here.

About

An easy to use lightweight universal logging backend for JUL, Log4J, SLF4J and JCL - no dependencies, no bridges

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages