import { ILogOptions } from './types/ILogOptions'; import { LogLevel } from './types/LogLevel'; /** * This class is a utility for logging messages to the console and/or a log file. * It supports different log levels ('NONE', 'DEBUG', 'INFO', 'WARN', 'ERROR') for both console and file logging. * It also supports color formatting for console messages. Different colors can be specified for each log level. */ export declare class Log { /** * The log level for console output. */ readonly consoleLogLevel: LogLevel; /** * Whether to debug info to console. */ readonly debugToConsole: boolean; /** * Whether to log info to console. */ readonly infoToConsole: boolean; /** * Whether to log warnings to console. */ readonly warnToConsole: boolean; /** * Whether to log errors to console. */ readonly errorToConsole: boolean; /** * The log level for the logfile. */ readonly fileLogLevel: LogLevel; /** * Whether to log debug info to the logfile. */ readonly debugToFile: boolean; /** * Whether to log info to the logfile. */ readonly infoToFile: boolean; /** * Whether to log warnings to the logfile. */ readonly warnToFile: boolean; /** * Whether to log errors to the logfile. */ readonly errorToFile: boolean; /** * The directory path of the log file. */ protected logDirpath: string; /** * The directory path of the log file. */ protected logDirpathWarnError: string; /** * Default options for creating new instances. */ static optionDefaults: Required; /** * Create a new instance. * @param options - Options for creating a new instance. */ constructor(options?: ILogOptions); /** * The filepath of the log file. */ get logFilepath(): string; /** * The filepath of the log file for warnings and errors. */ get logFilepathWarnError(): string; /** * Re-initialize the current instance with the specified options. */ initialize(options?: ILogOptions): void; /** * Logs a debug message the console. * @param data The message to print to console. * @param depth The depth to which to print object properties. */ debug(data: T, depth?: number): T; /** * Logs an info message the console. * @param data The message to print to console. * @param depth The depth to which to print object properties. */ info(data: T, depth?: number): T; /** * Logs a warning message to the console. * @param data The message to print to console. */ warn(data: T, depth?: number): T; /** * Logs a error message to the console. * @param error The Error object or message to print to console. */ error(error: T | Error): T | Error; /** * Write log entry to logfile * @param loglevel The log level. * @param data The message to print to console. */ protected logToFile(loglevel: LogLevel, data: T | Error): void; /** * Delete log files older than the specified number of days. * @param deleteFilesOlderThan The maximum age of log files in days. If not specified, no files will be deleted. */ deleteLogFiles(deleteFilesOlderThan?: number): void; /** * Prints a given number of blank lines to the console. * @remarks This is not logged to the log file. * @param numLines The number of blank lines to print. */ newline(numLines?: number): void; /** * Prints a given number of lines with dashes to the console. * @remarks This is not logged to the log file. * @param numLines The number of dash lines to print. * @param width The number of dashes per line. */ dashline(numLines?: number, width?: number): void; } //# sourceMappingURL=Log.d.ts.map