lib/zlog.js
function writeLog(logLevel, writeArgs) {

        var logName = loggerName || 'ROOT';
        var levelAppenders = [];
        var logger;

        // child level always overwrite parent levels
        // if the child does not allow, no appender even parents' ones won't show
        if (getLevelNumber(thisLogger.getLevel()) <= getLevelNumber(logLevel)) {
            logger = thisLogger;
            while (logger) {
                levelAppenders = _.concat(levelAppenders, logger.getAppenders()); logger = logger.getParent();
            }
        }

        // write the message to each appender no more than once!
        _.uniq(levelAppenders).forEach(function (appender) {

            var fmt = appender.pattern.format(logName, logLevel, writeArgs[0], _.slice(writeArgs, 1));

            var args = _.concat(logName, logLevel, fmt.message);
            // any more arguments ?
            if (fmt.otherArgs) {
                args = _.concat(args, fmt.otherArgs);
            }
            appender.writeLog.apply(this, args);
        });
    }
function writeLog(logLevel, writeArgs) {

        var logName = loggerName || 'ROOT';
        var levelAppenders = [];
        var logger;

        // child level always overwrite parent levels
        // if the child does not allow, no appender even parents' ones won't show
        if (getLevelNumber(thisLogger.getLevel()) <= getLevelNumber(logLevel)) {
            logger = thisLogger;
            while (logger) {
                levelAppenders = _.concat(levelAppenders, logger.getAppenders()); logger = logger.getParent();
            }
        }

        // write the message to each appender no more than once!
        _.uniq(levelAppenders).forEach(function (appender) {

            var fmt = appender.pattern.format(logName, logLevel, writeArgs[0], _.slice(writeArgs, 1));

            var args = _.concat(logName, logLevel, fmt.message);
            // any more arguments ?
            if (fmt.otherArgs) {
                args = _.concat(args, fmt.otherArgs);
            }
            appender.writeLog.apply(this, args);
        });
    }
function writeLog ( logLevel , writeArgs ) { var logName = loggerName || 'ROOT' ; var levelAppenders = [ ] ; var logger ; // child level always overwrite parent levels // if the child does not allow, no appender even parents' ones won't show if ( getLevelNumber ( thisLogger . getLevel ( ) ) <= getLevelNumber ( logLevel ) ) { logger = thisLogger ; while ( logger ) { levelAppenders = _ . concat ( levelAppenders , logger . getAppenders ( ) ) ; logger = logger . getParent ( ) ; } } // write the message to each appender no more than once! _ . uniq ( levelAppenders ) . forEach ( function ( appender ) { var fmt = appender . pattern . format ( logName , logLevel , writeArgs [ 0 ] , _ . slice ( writeArgs , 1 ) ) ; var args = _ . concat ( logName , logLevel , fmt . message ) ; // any more arguments ? if ( fmt . otherArgs ) { args = _ . concat ( args , fmt . otherArgs ) ; } appender . writeLog . apply ( this , args ) ; } ) ; }
write a log entry to all appenders.

All parent loggers will be checked to see if their appenders - if any - should write the log.

Up to the rootLogger.
write a log entry to all appenders .