mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-11-15 02:41:04 +00:00
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
/// <reference types="node" />
|
|
import { EventEmitter } from "events";
|
|
export declare class Logging {
|
|
private static logFileLocation;
|
|
static stdout: boolean;
|
|
private static fileStream;
|
|
private static errorStream;
|
|
private static fileSize;
|
|
private static errorSize;
|
|
private static writing;
|
|
private static queue;
|
|
static events: EventEmitter;
|
|
static config(logfolder: string, stdout: boolean): void;
|
|
static debug(...message: any[]): void;
|
|
static log(...message: any[]): void;
|
|
static warning(...message: any[]): void;
|
|
static logWithCustomColors(type: LoggingTypes, colors: string, ...message: any[]): void;
|
|
static error(error: Error | string): void;
|
|
static errorMessage(...message: string[]): void;
|
|
private static message(type, message, customColors?);
|
|
private static writeMessageToFile(message, error?);
|
|
private static checkQueue();
|
|
private static initializeFile();
|
|
}
|
|
export default Logging;
|
|
export declare enum LoggingTypes {
|
|
Log = 0,
|
|
Warning = 1,
|
|
Error = 2,
|
|
Debug = 3,
|
|
}
|