PrettyStructuredPrinter constructor

PrettyStructuredPrinter({
  1. int lineLength = 120,
  2. LogConfig? config,
  3. List<String>? excludePaths,
})

A structured and visually aligned log printer designed for clear readability.

This printer uses iconography, spacing, and formatting to make logs easy to scan, especially when scanning for fields like level, message, timestamp, and call stack.

Example Output:

┌──────────────────────────────────────────────────────────────────────────────
│ 📝 LEVEL     : INFO
│ 📅 TIMESTAMP : 2025-06-23 10:25:17.123
│ 🧩 MODULE    : AuthService
│ 🔍 MESSAGE   : Login succeeded
│ 📁 CALL STACK:
│    • #0 AuthService.login (auth_service.dart:42)
│    • #1 ...
└──────────────────────────────────────────────────────────────────────────────

Controlled by LogConfig and LogStep ordering.

Implementation

PrettyStructuredPrinter({
  this.lineLength = 120,
  LogConfig? config,
  List<String>? excludePaths,
}) : config = config ?? LogConfig(),
     excludePaths = excludePaths ?? StackTraceParser.defaultExcludePaths;