import { Jsonify } from "type-fest"; /** Semantic/structural logging component */ export interface SemanticLogger { /** Logs a message at debug priority. * Debug messages are used for diagnostics, and are typically disabled * in production builds. * @param message - a message to record in the log's `message` field. */ debug(message: string): void; /** Logs the content at debug priority. * Debug messages are used for diagnostics, and are typically disabled * in production builds. * @param content - JSON content included in the log's `content` field. * @param message - a message to record in the log's `message` field. */ debug(content: Jsonify, message?: string): void; /** combined signature for overloaded methods */ debug(content: Jsonify | string, message?: string): void; /** Logs a message at informational priority. * Information messages are used for status reports. * @param message - a message to record in the log's `message` field. */ info(message: string): void; /** Logs the content at informational priority. * Information messages are used for status reports. * @param content - JSON content included in the log's `content` field. * @param message - a message to record in the log's `message` field. */ info(content: Jsonify, message?: string): void; /** combined signature for overloaded methods */ info(content: Jsonify | string, message?: string): void; /** Logs a message at warn priority. * Warn messages are used to indicate a operation that may affect system * stability occurred. * @param message - a message to record in the log's `message` field. */ warn(message: string): void; /** Logs the content at warn priority. * Warn messages are used to indicate a operation that may affect system * stability occurred. * @param content - JSON content included in the log's `content` field. * @param message - a message to record in the log's `message` field. */ warn(content: Jsonify, message?: string): void; /** combined signature for overloaded methods */ warn(content: Jsonify | string, message?: string): void; /** Logs a message at error priority. * Error messages are used to indicate a operation that affects system * stability occurred and the system was able to recover. * @param message - a message to record in the log's `message` field. */ error(message: string): void; /** Logs the content at debug priority. * Error messages are used to indicate a operation that affects system * stability occurred and the system was able to recover. * @param content - JSON content included in the log's `content` field. * @param message - a message to record in the log's `message` field. */ error(content: Jsonify, message?: string): void; /** combined signature for overloaded methods */ error(content: Jsonify | string, message?: string): void; /** Logs a message at panic priority and throws an error. * Panic messages are used to indicate a operation that affects system * stability occurred and the system cannot recover. Panic messages * log an error and throw an `Error`. * @param message - a message to record in the log's `message` field. */ panic(message: string): never; /** Logs the content at debug priority and throws an error. * Panic messages are used to indicate a operation that affects system * stability occurred and the system cannot recover. Panic messages * log an error and throw an `Error`. * @param content - JSON content included in the log's `content` field. * @param message - a message to record in the log's `message` field. */ panic(content: Jsonify, message?: string): never; /** combined signature for overloaded methods */ panic(content: Jsonify | string, message?: string): never; }