lib/Core.class.js
/**
     * Register an existing logger in the system so that it can receive configuration updates.
     *
     * @param {Logger} logger
     */
Register an existing logger in the system so that it can receive configuration updates.
@param {Logger} logger
Register an existing logger in the system so that it can receive configuration updates . @param { Logger } logger
registerLogger(logger) {
        if (this._loggers[logger.name]) {
            throw new Error('Trying to create logger with existing name. Only one instance can exist with the same name');
        }
        this._loggers[logger.name] = logger;
        for (let pattern in this._rules) {
            if (logger.name.match(pattern)) {
                logger.config = this._rules[pattern];
            }
        }
    }
registerLogger ( logger ) { if ( this . _loggers [ logger . name ] ) { throw new Error ( 'Trying to create logger with existing name. Only one instance can exist with the same name' ) ; } this . _loggers [ logger . name ] = logger ; for ( let pattern in this . _rules ) { if ( logger . name . match ( pattern ) ) { logger . config = this . _rules [ pattern ] ; } } }
Register an existing logger in the system so that it can receive configuration updates.
Register an existing logger in the system so that it can receive configuration updates .