UNPKG

@sapphire/plugin-logger

Version:

Plugin for @sapphire/framework to have pretty console output

23 lines (20 loc) 837 B
'use strict'; var index_cjs = require('./index.cjs'); var framework = require('@sapphire/framework'); var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var _LoggerPlugin = class _LoggerPlugin extends framework.Plugin { /** * @since 1.0.0 */ static [framework.preGenericsInitialization](options) { options.logger ??= {}; options.logger.instance ??= new index_cjs.Logger(options.logger); } }; __name(_LoggerPlugin, "LoggerPlugin"); var LoggerPlugin = _LoggerPlugin; framework.SapphireClient.plugins.registerPreGenericsInitializationHook(LoggerPlugin[framework.preGenericsInitialization], "Logger-PreGenericsInitialization"); exports.LoggerPlugin = LoggerPlugin; //# sourceMappingURL=register.cjs.map //# sourceMappingURL=register.cjs.map