mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-11-22 11:29:24 +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 debug(...message: any[]): void;
|
||||||
static log(...message: any[]): void;
|
static log(...message: any[]): void;
|
||||||
static warning(...message: any[]): void;
|
static warning(...message: any[]): void;
|
||||||
|
static logWithCustomColors(type: LoggingTypes, colors: string, ...message: any[]): void;
|
||||||
static error(error: Error | string): void;
|
static error(error: Error | string): void;
|
||||||
static errorMessage(...message: 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 writeMessageToFile(message, error?);
|
||||||
private static checkQueue();
|
private static checkQueue();
|
||||||
private static initializeFile();
|
private static initializeFile();
|
||||||
|
36
out/index.js
36
out/index.js
@ -40,6 +40,9 @@ class Logging {
|
|||||||
static warning(...message) {
|
static warning(...message) {
|
||||||
Logging.message(LoggingTypes.Log, message);
|
Logging.message(LoggingTypes.Log, message);
|
||||||
}
|
}
|
||||||
|
static logWithCustomColors(type, colors, ...message) {
|
||||||
|
Logging.message(type, message, colors);
|
||||||
|
}
|
||||||
static error(error) {
|
static error(error) {
|
||||||
if (typeof error === "string") {
|
if (typeof error === "string") {
|
||||||
Logging.errorMessage(error);
|
Logging.errorMessage(error);
|
||||||
@ -55,21 +58,26 @@ class Logging {
|
|||||||
static errorMessage(...message) {
|
static errorMessage(...message) {
|
||||||
Logging.message(LoggingTypes.Error, message);
|
Logging.message(LoggingTypes.Error, message);
|
||||||
}
|
}
|
||||||
static async message(type, message) {
|
static async message(type, message, customColors) {
|
||||||
var consoleLogFormat = Reset;
|
var consoleLogFormat = Reset;
|
||||||
switch (type) {
|
if (!customColors) {
|
||||||
case LoggingTypes.Log:
|
switch (type) {
|
||||||
//m += FgWhite + BgBlack;
|
case LoggingTypes.Log:
|
||||||
break;
|
//m += FgWhite + BgBlack;
|
||||||
case LoggingTypes.Error:
|
break;
|
||||||
consoleLogFormat += FgRed; //FgWhite + BgRed + FgWhite;
|
case LoggingTypes.Error:
|
||||||
break;
|
consoleLogFormat += FgRed; //FgWhite + BgRed + FgWhite;
|
||||||
case LoggingTypes.Debug:
|
break;
|
||||||
consoleLogFormat += FgCyan;
|
case LoggingTypes.Debug:
|
||||||
break;
|
consoleLogFormat += FgCyan;
|
||||||
case LoggingTypes.Warning:
|
break;
|
||||||
consoleLogFormat += FgYellow;
|
case LoggingTypes.Warning:
|
||||||
break;
|
consoleLogFormat += FgYellow;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
consoleLogFormat += customColors;
|
||||||
}
|
}
|
||||||
var mb = "";
|
var mb = "";
|
||||||
if (typeof message === "string") {
|
if (typeof message === "string") {
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user