export declare enum LogLevel { OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, EVENT = 4, LOG = 5, DEBUG = 6, COMMENT = 7, ALL = 7 } export declare const LogType: { error: string; warn: string; info: string; event: string; log: string; debug: string; comment: string; }; export declare const colors: { red: string; orange: string; gold: string; yellow: string; green: string; teal: string; blue: string; indigo: string; violet: string; magenta: string; pink: string; brown: string; black: string; grey: string; white: string; default: string; }; export declare type ColorResolvable = NonNullable; export declare type LoggerIgnore = [title: string, level: LogLevel | keyof typeof LogLevel]; /** * @see {@link https://ayfri.gitbook.io/advanced-command-handler/utilities/logger} */ export declare class Logger { /** * Let you set the minimum level required for a log to be sent to console.

* For example if you set the level to `LogLevel.LOG`, the `Logger.debug()` and `Logger.comments()` methods won't log anything. */ static LEVEL: LogLevel; /** * Let you ignore Logs by title or by titles and levels. * * @example * // This will ignore any logs with the title 'mylogs'. * Logger.ignores.push('mylogs'); * * // This will ignore any logs with the title 'mylogs', and the level 'LOG' or less. * Logger.ignores.push(['mylogs', LogLevel.LOG]); * * // It can also work by setting the string version of the LogLevel. * Logger.ignores.push(['mylogs', 'LOG']); */ static ignores: Array; /** * The files where the logs are saved. */ static savingFiles: string[]; /** * @remarks * Avoid using it because you can't do anything with it. */ private constructor(); /** * Save from now the logs in the file. * * @param path - The path of the file. */ static saveInFile(path: string): void; /** * Log a message in the console as a comment. * * @remarks * Using the grey color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static comment(message: any, title?: string): void; /** * Log a message in the console as an error. * * @remarks * Using the red color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static error(message: any, title?: string): void; /** * Log a message in the console as an event. * * @remarks * Using the green color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static event(message: any, title?: string): void; /** * Log a message in the console as an info. * * @remarks * Using the blue color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static info(message: any, title?: string): void; /** * Log a message in the console. * * @remarks * Using the # color. * @param message - The message to log, can be anything. * @param title - The title of the log. * @param color - The color of the log. */ static log(message: any, title?: string, color?: ColorResolvable): void; /** * Set the color for the following text. * * @param color - The color of the text. * @param text - The text to colorize. * @returns - The text colored, adapted for consoles using escape sequences. */ static setColor(color?: ColorResolvable, text?: string): string; /** * Log a message in the console as a debug. * * @remarks * Using the default color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static debug(message: any, title?: string): void; /** * Log a message in the console as a warning. * * @remarks * Using the yellow color. * @param message - The message to log, can be anything. * @param title - The title of the log. */ static warn(message: any, title?: string): void; /** * Test if a title and level is ignored. * * @param title - The title of the log. * @param level - The level of the log. * @returns - Is it ignored or not. * @internal */ static isIgnored(title: string, level: LogLevel): boolean; /** * Log something in the console and transform the ColorResolvable into an ASCII Escape Sequence containing the color. * * @param text - The text to log. * @param color - The color of the text. * @param title - The title of the text. * @internal */ protected static process(text: any, color?: ColorResolvable, title?: string): void; /** * Returns a color in hexadecimal without the sharp from a ColorResolvable. * * @remarks * Returns the default color if it cannot be resolved. * @param color - The ColorResolvable. * @returns - The color. * @internal */ private static getColorFromColorResolvable; }