CartoDB-SQL-API/batch/batch-logger.js

20 lines
352 B
JavaScript
Raw Normal View History

'use strict';
2018-05-28 17:18:30 +08:00
const BunyanLogger = require('../app/services/bunyan_logger');
2018-05-23 23:24:48 +08:00
class BatchLogger extends BunyanLogger {
constructor (path, name) {
super(path, name);
}
2018-05-23 23:24:48 +08:00
log (job) {
return job.log(this.logger);
}
2018-05-23 23:24:48 +08:00
reopenFileStreams () {
this.logger.reopenFileStreams();
}
}
2018-05-23 23:24:48 +08:00
module.exports = BatchLogger;