Logging Update

- Changed to uniform logging with the 'debug' module
- Updated all apps
This commit is contained in:
Logan Cusano
2022-12-11 21:11:29 -05:00
parent e403560165
commit e5d885cc3e
21 changed files with 105 additions and 53 deletions

View File

@@ -0,0 +1,17 @@
// Debug
import Debug from 'debug';
/**
* Create the different logging methods for a function
* Namespace template = ("[app]:[fileName]:['INFO', 'WARNING', 'DEBUG', 'ERROR']")
* @param {string} appName The name of the app to be used in the 'app' portion of the namespace
* @param {string} fileName The name of the file calling the builder to be used in the 'fileName' portion of the namespace
*/
export default class ModuleDebugBuilder {
constructor(appName, fileName) {
this.INFO = Debug(`${appName}:${fileName}:INFO`);
this.DEBUG = Debug(`${appName}:${fileName}:DEBUG`);
this.WARN = Debug(`${appName}:${fileName}:WARNING`);
this.ERROR = Debug(`${appName}:${fileName}:ERROR`);
}
}