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.