/** * Best-effort caller-frame capture for the `${callsite}` layout variable. * * NLog gates stack-trace capture behind `StackTraceUsage` so that logging is * zero-cost unless a target's layout actually references the caller. This * mirrors that: {@link FrameworkLogger} only calls {@link captureCallsite} * when some target's layout references `${callsite}`, so the `new Error()` * ( the only cost here ) is never constructed otherwise. * * The parser is intentionally defensive - it must NEVER throw. Browser stack * formats vary and V8's format is not guaranteed, so an unparseable stack just * yields `""` rather than crashing a log call. */ /** * Walk the current stack and return the first frame OUTSIDE the log package - * i.e. the user's call site - as `"basename:line"` ( e.g. `service.ts:42` ). * * Internal frames belonging to the logger itself ( `log.ts`, `callsite.ts`, * the `log-common` package, `wrapWrite`, `createLogMessageObject` ) are skipped * so the returned frame is the caller of `log.info(...)` / `log.error(...)`. * * Returns `""` when no frame can be parsed ( no stack, or an unrecognized * stack format ). Best-effort by design. */ export declare function captureCallsite(): string; //# sourceMappingURL=callsite.d.ts.map