mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-11-22 11:39:23 +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();
|
||||
|
10
out/index.js
10
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,8 +58,9 @@ class Logging {
|
||||
static errorMessage(...message) {
|
||||
Logging.message(LoggingTypes.Error, message);
|
||||
}
|
||||
static async message(type, message) {
|
||||
static async message(type, message, customColors) {
|
||||
var consoleLogFormat = Reset;
|
||||
if (!customColors) {
|
||||
switch (type) {
|
||||
case LoggingTypes.Log:
|
||||
//m += FgWhite + BgBlack;
|
||||
@ -71,6 +75,10 @@ class Logging {
|
||||
consoleLogFormat += FgYellow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
consoleLogFormat += customColors;
|
||||
}
|
||||
var mb = "";
|
||||
if (typeof message === "string") {
|
||||
mb = message;
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user