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