lib/logger.js
function _log(message) {
    if (cluster.isMaster) {
        // write directly to the log file
        console.log(_format(message));
    }
    else {
        // send to master
        cluster.worker.process.send({
            type: "logging",
            data: {
                message: message,
                workerID: cluster.worker.id,
                pid: cluster.worker.process.pid
            }
        });
    }
}
function _log(message) {
    if (cluster.isMaster) {
        // write directly to the log file
        console.log(_format(message));
    }
    else {
        // send to master
        cluster.worker.process.send({
            type: "logging",
            data: {
                message: message,
                workerID: cluster.worker.id,
                pid: cluster.worker.process.pid
            }
        });
    }
}
function _log ( message ) { if ( cluster . isMaster ) { // write directly to the log file console . log ( _format ( message ) ) ; } else { // send to master cluster . worker . process . send ( { type : "logging" , data : { message : message , workerID : cluster . worker . id , pid : cluster . worker . process . pid } } ) ; } }
Logs message. Forwards message from child process to master
@param {String} message
@private
Logs message . Forwards message from child process to master