lib/logger.js
function emit(name, next) {
        var transport = that.transports[name];
        if ((transport.level && that.levels[transport.level] <= that.levels[level])
            || (!transport.level && that.levels[that.level] <= that.levels[level])) {
            transport.log(rec, function (err) {
                if (err) {
                    err.transport = transport;
                    cb(err);
                    return next();
                }
                that.emit('logging', transport, rec);
                next();
            });
        } else {
            next();
        }
    }
function emit(name, next) {
        var transport = that.transports[name];
        if ((transport.level && that.levels[transport.level] <= that.levels[level])
            || (!transport.level && that.levels[that.level] <= that.levels[level])) {
            transport.log(rec, function (err) {
                if (err) {
                    err.transport = transport;
                    cb(err);
                    return next();
                }
                that.emit('logging', transport, rec);
                next();
            });
        } else {
            next();
        }
    }
function emit ( name , next ) { var transport = that . transports [ name ] ; if ( ( transport . level && that . levels [ transport . level ] <= that . levels [ level ] ) || ( ! transport . level && that . levels [ that . level ] <= that . levels [ level ] ) ) { transport . log ( rec , function ( err ) { if ( err ) { err . transport = transport ; cb ( err ) ; return next ( ) ; } that . emit ( 'logging' , transport , rec ) ; next ( ) ; } ) ; } else { next ( ) ; } }
Log for each transport and emit 'logging' event
Log for each transport and emit logging event