mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-21 13:38:21 -05:00
Only log crashes
This commit is contained in:
parent
8a927d2f02
commit
4a16f8c69d
@ -1,38 +1,21 @@
|
||||
import chalk from "chalk";
|
||||
import ora, { Ora } from "ora";
|
||||
import ModManager from "../mod-manager.js";
|
||||
|
||||
export default class PrintUtils {
|
||||
|
||||
static info(print: string) {
|
||||
if (ModManager.logger != null) {
|
||||
ModManager.logger.info(print);
|
||||
}
|
||||
|
||||
console.log(chalk.white(print));
|
||||
}
|
||||
|
||||
static warn(print: string) {
|
||||
if (ModManager.logger != null) {
|
||||
ModManager.logger.warn(print)
|
||||
}
|
||||
|
||||
console.log(chalk.yellowBright(print));
|
||||
}
|
||||
|
||||
static success(print: string) {
|
||||
if (ModManager.logger != null) {
|
||||
ModManager.logger.info(print)
|
||||
}
|
||||
|
||||
console.log(chalk.greenBright(print));
|
||||
}
|
||||
|
||||
static error(print: string) {
|
||||
if (ModManager.logger != null) {
|
||||
ModManager.logger.error(print);
|
||||
}
|
||||
|
||||
console.log(chalk.redBright(print));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user