Migrate to dyetty
This commit is contained in:
parent
c8b4a2f756
commit
247ecb3484
16
console.ts
16
console.ts
|
@ -1,4 +1,4 @@
|
|||
import chalk from "chalk";
|
||||
import * as dyetty from "dyetty";
|
||||
import { createWriteStream, mkdirSync, existsSync } from "fs";
|
||||
|
||||
console.clear();
|
||||
|
@ -17,10 +17,10 @@ enum LogTag {
|
|||
}
|
||||
|
||||
const LogTags = [
|
||||
chalk.bgGreen(chalk.black(" INFO ")),
|
||||
chalk.bgCyan(chalk.black(" CHAT ")),
|
||||
chalk.bgYellow(chalk.black(" WARN ")),
|
||||
chalk.bgRed(" ERRR ")
|
||||
dyetty.bgGreen(dyetty.black(" INFO ")),
|
||||
dyetty.bgCyan(dyetty.black(" CHAT ")),
|
||||
dyetty.bgYellow(dyetty.black(" WARN ")),
|
||||
dyetty.bgRed(" ERRR ")
|
||||
] as const;
|
||||
|
||||
const TagsForFile = [
|
||||
|
@ -48,11 +48,11 @@ function log(tag:LogTag, log:string, logType:LogType = LogType.INFO) : void {
|
|||
Console.QUEUED_FOR_LOG += `${stringTime} ${fileTag} ${log}\n`;
|
||||
switch (logType) {
|
||||
case LogType.INFO:
|
||||
return console.log(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
||||
return console.log(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||
case LogType.WARN:
|
||||
return console.warn(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
||||
return console.warn(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||
case LogType.ERROR:
|
||||
return console.error(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
||||
return console.error(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,7 @@
|
|||
"homepage": "https://github.com/tgpholly/mc-beta-server#readme",
|
||||
"dependencies": {
|
||||
"bufferstuff": "^1.3.0",
|
||||
"chalk": "^4.1.2"
|
||||
"dyetty": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.4.5",
|
||||
|
|
Loading…
Reference in New Issue