Become a member!

LoggerPro 2.1 Released: JSON Configuration, ExeWatch, LogFmt and Much More

๐ŸŒ
This article is also available in other languages:
๐Ÿ‡ฎ๐Ÿ‡น Italiano  โ€ข  ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol  โ€ข  ๐Ÿ‡ฉ๐Ÿ‡ช Deutsch

LoggerPro 2.1

LoggerPro 2.1 is out. If you have been using the library for a file appender and the odd console output, brace yourself - this release turns LoggerPro into a full observability toolkit for Delphi. And every bit of it stays Apache 2.0, cross-platform, and backward compatible with your 2.0 code.

๐Ÿ“˜ Jump straight into the docs: LoggerPro 2.1 - The Official Guide โ†’ Every feature below is covered in depth, with full code samples and JSON configuration examples.


What Changed - The Highlights

๐Ÿ”ง JSON Configuration Without Recompiling

Ship a loggerpro.json next to the EXE. Operators reshape the logging pipeline at deploy time - switch backends, adjust thresholds, add or remove appenders - without touching Delphi source. Two entry points, depending on how far you want to go:

// Pure JSON โ†’ ILogWriter
Log := LoggerProFromJSONFile('loggerpro.json');

// JSON base + code-side chaining (e.g. UI-bound appenders)
Log := LoggerProBuilderFromJSONFile('loggerpro.json')
         .WriteToVCLMemo(Memo1).Done
         .Build;

Strict schema validation means typos fail loudly with diagnostic error messages listing the valid alternatives. No silent half-working deployments.

๐Ÿ“ก ExeWatch Cloud Observability

First-class bridge to ExeWatch - the cloud observability service for desktop and backend applications. Logs, exceptions, breadcrumbs, device info, everything a production incident investigation asks for, with a dashboard that does not require shipping log files around.

Plug it in any way you prefer - fluent Builder, imperative NewExeWatchAppender, or pure JSON:

{
  "appenders": [
    { "type": "Console" },
    {
      "type": "ExeWatch",
      "apiKey": "ew_win_xxxxxx",
      "customerId": "Acme Corp",
      "appVersion": "2.3.1"
    }
  ]
}

No manual SDK init - the appender handles it at Setup.

๐Ÿท๏ธ LogFmt - Greppable, Loki-Friendly Output

A spec-compliant LogFmt renderer joins the family. Output is one line per event, key=value pairs separated by spaces, safe values bare and unsafe values quoted:

time=2026-04-18T12:30:45.123Z threadid=7932 type=INFO msg="order placed" tag=ORDERS order_id=42 amount=99.95 paid=true

Ships natively queryable with Grafana Loki, humanlog, ripgrep, Vector, Promtail, and Fluent Bit. Tail it on Windows with Get-Content -Wait | rg ERROR and you have a poor-man’s observability stack in a single PowerShell line.

๐ŸŒ Browser-Ready HTML Log Viewer

A self-contained .html file with a sticky filter bar, per-level row coloring, full-text search, CSV/JSON export, and live tailing. Hand it to QA or support and they have a compact, offline-capable troubleshooting artifact - no server, no external assets, no setup.

๐Ÿข FileBySource - Per-Tenant Logs, Finally

A new appender that writes into per-source subfolders (think per-tenant, per-client, per-service). Day + size rotation, day-based retention, automatic cleanup of empty folders. Paired with WithDefaultContext on a sub-logger, every connection gets its own isolated log stream without repeating the source on every call.

And More

  • UTF-8 console output with WithUTF8Output - no more mangled CJK, Cyrillic, or emoji in Docker containers and Windows consoles
  • DLL-safe initialization - the Windows Loader Lock deadlock when LoggerPro runs inside a DLL is gone
  • ElasticSearch authentication - Basic Auth, API Key, Bearer Token
  • Runtime MinimumLevel - flip the global gate at runtime, no cast needed
  • UDP Syslog local time option - for on-prem servers that expect local time instead of the RFC 5424 UTC
  • GetCurrentLogFileName API on file appenders - handy for upload, email, or restart flows

Why It Matters

Delphi has had logging libraries for twenty years. What 2.1 gets right is alignment with how the rest of the industry ships telemetry in 2026:

  • LogFmt and JSONL for structured, greppable, machine-friendly output
  • JSON configuration for deploy-time flexibility without rebuilds
  • Cloud observability via ExeWatch without writing a single HTTP call
  • Self-contained HTML artifacts for human-friendly support scenarios

Taken together, they bring a Delphi application to the same operational footprint a .NET or Go service would have - with the Object Pascal code you already know.


Upgrade Path

2.0 โ†’ 2.1 is a drop-in upgrade. The sole breaking change is WriteToHTTP being renamed to WriteToWebhook (a find-and-replace fixes it). Everything else is additive. Your 2.0 Builder chains keep compiling; your existing appenders and renderers keep working.

Minimum Delphi: 10.2 Tokyo. Tested up to Delphi 13 Florence. Runs on Windows, Linux, macOS, Android, iOS.


Start Here

๐Ÿ“˜ LoggerPro 2.1 โ€” The Official Guide โ†’

The guide covers every feature above with working code samples, JSON configuration schemas, diagnostic error walkthroughs, querying recipes for LogFmt output, and a complete built-in appender reference.

๐Ÿ”— Links

Happy logging.

Comments

comments powered by Disqus