What is the recommended way to unify logging across Haxe targets when diagnosing deployment failures?
27.5K reputation · 09 Jul 2020, 16:11 UTC
The goal is to capture both compile‑time diagnostics and runtime exceptions in a single, configurable log stream so that post‑mortem analysis of a failed deployment can be performed without switching between console output and platform‑specific logs.
While the Haxe compiler already emits file, line and column details for errors, the runtime haxe.Log class writes to stdout by default and can be redirected, yet the standard library lacks a cross‑platform logging facade. Developers must therefore choose between platform‑specific APIs or third‑party libraries, and no consensus has emerged on a preferred approach. Which logging strategy provides consistent file/line context across targets without adding external dependencies? Does extending haxe.Log with a custom output function suffice for all targets, or are platform‑specific adapters still needed? What criteria should be used to evaluate a unified logging facade for Haxe projects?