import globals, { Runtime } from "./globals"; export { consoleWriter } from "./consolewriter"; /** * This function is for use by the [internal-runtime] package only. This should be considered an unstable API and * may change at any time without warning or impacting the semver of this package. * * @internal */ export function setRuntimeForLogging_encoreInternal( runtime: Runtime, paramHook: () => Record, ): void { globals.Runtime = runtime; globals.ParamHook = paramHook; } /** * This function is for use by the [internal-runtime] package only. This should be considered an unstable API and * may change at any time without warning or impacting the semver of this package. * * @internal */ export function configureForGCP_encoreInternal(): void { globals.LevelFieldName = "severity"; globals.TimestampFieldName = "timestamp"; globals.TimestampFieldFormatter = (time) => time.toISOString(); } export function jsonlWriter(obj: unknown): string { return JSON.stringify(obj) + "\n"; }