printers library

๐Ÿ–จ๏ธ JetLeaf Logging Printers

This library exposes all built-in printer implementations used by the JetLeaf logging system to format and render log output.

Printers control how logs are displayed, whether in human-readable, compact, or structured formats. They can be combined, customized, or replaced with custom implementations.

๐ŸŽจ Available Printers

๐Ÿ“Œ Flat Output

  • FlatPrinter โ€” minimal single-line output
  • FlatStructuredPrinter โ€” flat formatting with structured fields

Ideal for CLI tools and compact logs.

๐Ÿงพ Formatted Output

  • FmtPrinter โ€” template-driven formatting (printf-style)

Useful when enforcing consistent patterns.

๐Ÿ”€ Hybrid Output

  • HybridPrinter โ€” mixes pretty and structured formatting based on context

Great when balancing human readability and machine parsing.

๐Ÿท Prefixing Support

  • PrefixPrinter โ€” adds prefixes (categories, timestamps, thread IDs, etc.)

Can wrap other printers to extend behavior.

๐ŸŒˆ Pretty Output

  • PrettyPrinter โ€” colorized, multi-line, developer-friendly formatting
  • PrettyStructuredPrinter โ€” pretty formatting with structured metadata

Ideal for debugging and local development.

โœ… Simple Output

  • SimplePrinter โ€” lightweight text output without styling

Good for environments with limited terminal capabilities.

๐ŸŽฏ Intended Usage

Import to configure logging behavior:

import 'package:jetleaf_logging/printers.dart';

final printer = PrettyPrinter();

Printers are typically assigned through LogConfig or LogFactory.

ยฉ 2025 Hapnium & JetLeaf Contributors

Classes

FlatPrinter
A simple, flat-style log printer that outputs log records in a structured format.
FlatStructuredPrinter
A structured log printer that formats log records with optional indentation and stack traces.
FmtPrinter
A log printer that outputs logs in logfmt format.
HybridPrinter
A hybrid log printer that delegates printing based on log level.
PrefixPrinter
A customizable log printer that prepends a prefix to each log line.
PrettyPrinter
A visually styled log printer that wraps log output in a clean box format.
PrettyStructuredPrinter
A structured and visually aligned log printer designed for clear readability.
SimplePrinter
Simple printer that outputs basic, compact log messages in a single line.