// The AutoManager's NODE_DEBUG section, shared by the collaborators split // out of automanager.ts so their lines land in the same log. import * as util from "util"; const debug = util.debuglog("norsk-automanager"); /** Formats only when NODE_DEBUG enables the section: the deep, unbounded * pretty-print below is otherwise paid on every call for nothing — * `nodes()` passes the whole node map, and norsk-mgr polls it. */ export function debuglog(msg: string, ...param: unknown[]): void { if (!debug.enabled) return; debug( util.formatWithOptions( { maxArrayLength: null, depth: null, colors: true }, "[" + new Date().toISOString() + "] " + msg, ...param ) ); }