/** * The debugLog handles formatting and routing debug statements to * different logging outputs. */ type LogDestination = (messageType: string, message: string | undefined, stackTrace?: string) => void; /** * Returns a function that will route debugLog events * through the `sendEvent` function. This is typically used * for sending events through to the current `lo_event` loggers. * Events are transmitted when the count of a specific event * type reaches a power of 10. */ declare function sendEventToLogger(sendEvent: (eventType: string, payload: object) => void): LogDestination; /** * Send debugLog event to the browser console */ declare function sendToConsole(messageType: string, message: string | undefined, stackTrace?: string): void; /** * LOG_OUTPUT refer to where we route debug events * `CONSOLE`: routes events to the browser console * `LOGGER`: routes events to standard `lo_event` pipeline */ declare const LOG_OUTPUT: { readonly CONSOLE: typeof sendToConsole; readonly LOGGER: typeof sendEventToLogger; }; /** * LEVEL corresponds to how much information we include when we log something * `none`: does not log any information * `simple`: logs the data as is * `extended`: logs the data in conjuction with timestamp and stack trace */ declare const LEVEL: { readonly NONE: "none"; readonly SIMPLE: "simple"; readonly EXTENDED: "extended"; }; declare function setLevel(level: string): void; declare function setLogOutputs(outputs: LogDestination[]): void; declare function info(log: string, stack?: string): void; declare function error(log: string, error?: unknown): void; export { LEVEL, LOG_OUTPUT, type LogDestination, error, info, setLevel, setLogOutputs };