From 815414520b6dedbc7e87b14cbff853de8cd4d0ea Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 15 Mar 2022 02:01:18 +0200 Subject: [PATCH] logger --- src/structure/storage/StorageManager.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/structure/storage/StorageManager.js b/src/structure/storage/StorageManager.js index d9a71e2..ee2e246 100644 --- a/src/structure/storage/StorageManager.js +++ b/src/structure/storage/StorageManager.js @@ -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() {