zcl

February 19, 2026 ยท View on GitHub

Zero-dependency Colour Logger

A lightweight Java logging utility with ANSI color support for enhanced console output readability.

Integration

The Log class is designed to be reused by copying the source code directly into your project - no dependencies or JAR files needed.

Duke Painter

Usage


// Direct enum usage
Log.ERROR.out("Critical error occurred");
Log.INFO.out("Operation completed");
Log.WARNING.out("Resource usage high");
Log.DEBUG.out("Entering method X");

// Static convenience methods
Log.error("Database connection failed", exception);
Log.user("Welcome to the application");
Log.warning("Cache miss detected");
Log.debug("Processing item #42");

Log Levels

  • ERROR (Red) - Critical failures, outputs to stderr
  • USER (Cyan) - User messages and interactive elements
  • INFO (Green) - General information
  • SYSTEM (Blue) - System-level messages
  • WARNING (Yellow) - Warning conditions
  • DEBUG (Violet) - Debug information for developers
  • SUCCESS (Magenta) - Completed actions and positive confirmations

Colors use the Solarized Dark accent palette.

Demo

Run the demo to see all colors:

java Demo.java