UNPKG

@rasla/logify

Version:

A lightweight, flexible, and easy-to-use logging middleware for Elysia.js applications

36 lines (35 loc) 1.18 kB
import { ILogger, LoggerOptions } from "./types"; /** * Initialize the global logger with the provided options * * @param options Logger configuration options * @returns The configured logger instance */ export declare function initializeLogger(options?: LoggerOptions): ILogger; /** * Get the global logger instance * If the logger hasn't been initialized, it will be created with default options * * @returns The global logger instance */ export declare function getLogger(): ILogger; /** * Global debug log method * @param input Log message or log entry */ export declare function debug(input: string | Partial<Parameters<ILogger["debug"]>[0]>): void; /** * Global info log method * @param input Log message or log entry */ export declare function info(input: string | Partial<Parameters<ILogger["info"]>[0]>): void; /** * Global warn log method * @param input Log message or log entry */ export declare function warn(input: string | Partial<Parameters<ILogger["warn"]>[0]>): void; /** * Global error log method * @param input Log message or log entry */ export declare function error(input: string | Partial<Parameters<ILogger["error"]>[0]>): void;