mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-12-23 04:29:22 +00:00
adding builded files
This commit is contained in:
parent
feae07bcb0
commit
e950da73f9
3
out/index.d.ts
vendored
3
out/index.d.ts
vendored
@ -12,9 +12,10 @@ export declare class Logging {
|
||||
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);
|
||||
private static message(type, message, customColors?);
|
||||
private static writeMessageToFile(message, error?);
|
||||
private static checkQueue();
|
||||
private static initializeFile();
|
||||
|
36
out/index.js
36
out/index.js
@ -40,6 +40,9 @@ class Logging {
|
||||
static warning(...message) {
|
||||
Logging.message(LoggingTypes.Log, message);
|
||||
}
|
||||
static logWithCustomColors(type, colors, ...message) {
|
||||
Logging.message(type, message, colors);
|
||||
}
|
||||
static error(error) {
|
||||
if (typeof error === "string") {
|
||||
Logging.errorMessage(error);
|
||||
@ -55,21 +58,26 @@ class Logging {
|
||||
static errorMessage(...message) {
|
||||
Logging.message(LoggingTypes.Error, message);
|
||||
}
|
||||
static async message(type, message) {
|
||||
static async message(type, message, customColors) {
|
||||
var consoleLogFormat = Reset;
|
||||
switch (type) {
|
||||
case LoggingTypes.Log:
|
||||
//m += FgWhite + BgBlack;
|
||||
break;
|
||||
case LoggingTypes.Error:
|
||||
consoleLogFormat += FgRed; //FgWhite + BgRed + FgWhite;
|
||||
break;
|
||||
case LoggingTypes.Debug:
|
||||
consoleLogFormat += FgCyan;
|
||||
break;
|
||||
case LoggingTypes.Warning:
|
||||
consoleLogFormat += FgYellow;
|
||||
break;
|
||||
if (!customColors) {
|
||||
switch (type) {
|
||||
case LoggingTypes.Log:
|
||||
//m += FgWhite + BgBlack;
|
||||
break;
|
||||
case LoggingTypes.Error:
|
||||
consoleLogFormat += FgRed; //FgWhite + BgRed + FgWhite;
|
||||
break;
|
||||
case LoggingTypes.Debug:
|
||||
consoleLogFormat += FgCyan;
|
||||
break;
|
||||
case LoggingTypes.Warning:
|
||||
consoleLogFormat += FgYellow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
consoleLogFormat += customColors;
|
||||
}
|
||||
var mb = "";
|
||||
if (typeof message === "string") {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user