lib/Logger.class.js
/**
     * Logs a message with the given parameters. Accepts a formatter pattern, parameters, mdc and exceptions as
     * arguments (in any order). Only restriction is that the first string to be found is used as the pattern.
     * @returns {Event}
     */
Logs a message with the given parameters. Accepts a formatter pattern, parameters, mdc and exceptions as
arguments (in any order). Only restriction is that the first string to be found is used as the pattern.
@returns {Event}
Logs a message with the given parameters . Accepts a formatter pattern parameters mdc and exceptions as arguments ( in any order ) . Only restriction is that the first string to be found is used as the pattern . @returns { Event }
log() {
        let level, pattern, error, mdc, params = [];
        for (let arg of arguments) {
            if (arg instanceof Level.constructor) {
                level = arg;
                if (!this.enabled(level)) {
                    return;
                }
            }
            else if (arg instanceof Error) {
                error = arg;
            }
            else if (arg instanceof MDC) {
                mdc = arg;
            }
            else if (_.isString(arg) && !pattern) {
                pattern = arg;
            }
            else {
                params.push(arg);
            }
        }
        let event = new Event(this._name, level, pattern, mdc, error, params, this);
        Core.queueEvent(event);
        return event;
    }
log ( ) { let level , pattern , error , mdc , params = [ ] ; for ( let arg of arguments ) { if ( arg instanceof Level . constructor ) { level = arg ; if ( ! this . enabled ( level ) ) { return ; } } else if ( arg instanceof Error ) { error = arg ; } else if ( arg instanceof MDC ) { mdc = arg ; } else if ( _ . isString ( arg ) && ! pattern ) { pattern = arg ; } else { params . push ( arg ) ; } } let event = new Event ( this . _name , level , pattern , mdc , error , params , this ) ; Core . queueEvent ( event ) ; return event ; }
Logs a message with the given parameters.
Logs a message with the given parameters .