forked from Galactic/galactic-bot
logger
This commit is contained in:
parent
b7ebb00fdf
commit
815414520b
@ -3,6 +3,7 @@ const fs = require('fs');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const { Provider } = require('./interfaces/');
|
||||
const { Logger } = require('../client');
|
||||
|
||||
class StorageManager {
|
||||
|
||||
@ -12,6 +13,8 @@ class StorageManager {
|
||||
|
||||
this.providers = {};
|
||||
this.options = options;
|
||||
|
||||
this.logger = new Logger(this);
|
||||
|
||||
}
|
||||
|
||||
@ -46,12 +49,14 @@ class StorageManager {
|
||||
|
||||
_error(info, instance = null) {
|
||||
//TODO: Change logging string to remove [STORA]
|
||||
this.client.logger.error(`${chalk.bold(`[STORA]`)} ${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
// this.client.logger.error(`${chalk.bold(`[STORA]`)} ${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
this.logger.error(`${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
}
|
||||
|
||||
_log(info, instance = null) {
|
||||
//TODO: Change logging string to remove [STORA]
|
||||
this.client.logger.info(`${chalk.bold(`[STORA]`)} ${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
// this.client.logger.info(`${chalk.bold(`[STORA]`)} ${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
this.logger.info(`${instance ? `(${this._getName(instance)}) ` : ''}${info}`);
|
||||
}
|
||||
|
||||
get mongodb() {
|
||||
|
Loading…
Reference in New Issue
Block a user