Migrate to dyetty
This commit is contained in:
parent
c8b4a2f756
commit
247ecb3484
3 changed files with 23 additions and 2048 deletions
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";
|
import { createWriteStream, mkdirSync, existsSync } from "fs";
|
||||||
|
|
||||||
console.clear();
|
console.clear();
|
||||||
|
@ -17,10 +17,10 @@ enum LogTag {
|
||||||
}
|
}
|
||||||
|
|
||||||
const LogTags = [
|
const LogTags = [
|
||||||
chalk.bgGreen(chalk.black(" INFO ")),
|
dyetty.bgGreen(dyetty.black(" INFO ")),
|
||||||
chalk.bgCyan(chalk.black(" CHAT ")),
|
dyetty.bgCyan(dyetty.black(" CHAT ")),
|
||||||
chalk.bgYellow(chalk.black(" WARN ")),
|
dyetty.bgYellow(dyetty.black(" WARN ")),
|
||||||
chalk.bgRed(" ERRR ")
|
dyetty.bgRed(" ERRR ")
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const TagsForFile = [
|
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`;
|
Console.QUEUED_FOR_LOG += `${stringTime} ${fileTag} ${log}\n`;
|
||||||
switch (logType) {
|
switch (logType) {
|
||||||
case LogType.INFO:
|
case LogType.INFO:
|
||||||
return console.log(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
return console.log(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||||
case LogType.WARN:
|
case LogType.WARN:
|
||||||
return console.warn(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
return console.warn(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||||
case LogType.ERROR:
|
case LogType.ERROR:
|
||||||
return console.error(`${chalk.green(stringTime)} ${consoleTag} ${log}`);
|
return console.error(`${dyetty.green(stringTime)} ${consoleTag} ${log}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2053
package-lock.json
generated
2053
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,7 @@
|
||||||
"homepage": "https://github.com/tgpholly/mc-beta-server#readme",
|
"homepage": "https://github.com/tgpholly/mc-beta-server#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bufferstuff": "^1.3.0",
|
"bufferstuff": "^1.3.0",
|
||||||
"chalk": "^4.1.2"
|
"dyetty": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.4.5",
|
"@types/node": "^20.4.5",
|
||||||
|
|
Loading…
Reference in a new issue