1
0
mirror of https://git.stamm.me/OpenServer/NodeLogging.git synced 2024-11-25 16:09:24 +00:00

adding builded files

This commit is contained in:
Fabian Stamm 2017-09-16 19:22:02 +02:00
parent feae07bcb0
commit e950da73f9
3 changed files with 25 additions and 16 deletions

3
out/index.d.ts vendored
View File

@ -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();

View File

@ -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