rjweb-server
Version:
Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS
62 lines (61 loc) • 1.39 kB
TypeScript
import { Options } from "../functions/parseOptions";
import { DeepRequired } from "../types/internal";
export declare const colors: {
reset: string;
bright: string;
dim: string;
underscore: string;
blink: string;
reverse: string;
hidden: string;
fg: {
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
};
bg: {
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
crimson: string;
};
};
/**
* A Logger used for automatically parsing messages from any place
* @example
* ```
* const logger = new Logger(...)
* ```
* @since 7.4.0
*/ export default class Logger {
protected logs: number;
private options;
/**
* Create a new Logger instance
* @since 7.4.0
*/ constructor(options: DeepRequired<Options>['logging']);
/**
* Log an error message
* @since 7.4.0
*/ error(...messages: any[]): this;
/**
* Log a warn message
* @since 7.4.0
*/ warn(...messages: any[]): this;
/**
* Log a debug message
* @since 7.4.0
*/ debug(...messages: any[]): this;
}