@sidequest/core
Version:
@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.
30 lines (27 loc) • 796 B
TypeScript
import winston from 'winston';
/**
* Re-export of the Winston Logger type.
*/
type Logger = winston.Logger;
/**
* Options for configuring the logger.
*/
interface LoggerOptions {
/** The minimum log level (e.g., 'info', 'debug', 'error'). */
level: string;
/** Whether to output logs in JSON format. */
json?: boolean;
}
/**
* Configures and creates a Winston logger for Sidequest.
* @param options Logger configuration options.
* @returns The configured Winston logger instance.
*/
declare function configureLogger(options: LoggerOptions): winston.Logger;
/**
* Returns the default logger instance.
* @returns The Winston logger instance.
*/
declare function logger(scope?: string): Logger;
export { configureLogger, logger };
export type { Logger, LoggerOptions };