Source: apc-static/lib/log/batch_logger.js

/**
 * Batch logger.
 * @augment lib.log.FileLogger
 * @constructor lib.log.BatchLogger
 * @param {string} level - Log level.
 * @author Taka Okunishi
 */

var FileLogger = require('./file_logger');

var object = require('../object'),
    define = object.define;

module.exports = define({
    prototype: FileLogger,
    /** @lends lib.log.BatchLogger.prototype **/
    properties: {
        /**
         * Log that the batch started.
         * @param {string} batchName - Batch name to log.
         */
        batchStart: function (batchName) {
            var s = this;
            s.info('=== %s start ===', batchName);
        },
        /**
         * Log that the batch succeeded.
         * @param {string} batchName - Batch name to log.
         */
        batchSuccess: function (batchName) {
            var s = this;
            s.info('=== %s done ===', batchName);
        },
        /**
         * Log that the batch failed.
         * @param {string} batchName - Batch name to log.
         */
        batchFail: function (batchName) {
            var s = this;
            s.error('=== %s failed ===', batchName);
        }
    }
});