This commit is contained in:
Erik 2022-03-15 02:01:18 +02:00
parent b7ebb00fdf
commit 815414520b
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589

View File

@ -3,6 +3,7 @@ const fs = require('fs');
const chalk = require('chalk');
const { Provider } = require('./interfaces/');
const { Logger } = require('../client');
class StorageManager {
@ -13,6 +14,8 @@ class StorageManager {
this.providers = {};
this.options = options;
this.logger = new Logger(this);
}
async initialize() {
@ -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() {