2016-09-29 21:09:36 +08:00
|
|
|
'use strict';
|
|
|
|
|
2018-05-23 23:24:48 +08:00
|
|
|
const BunyanLogger = require('../app/services/bunyanLogger');
|
2016-09-29 21:09:36 +08:00
|
|
|
|
2018-05-23 23:24:48 +08:00
|
|
|
class BatchLogger extends BunyanLogger {
|
|
|
|
constructor (path, name) {
|
|
|
|
super(path, name);
|
2016-10-03 19:28:13 +08:00
|
|
|
}
|
2016-09-29 21:09:36 +08:00
|
|
|
|
2018-05-23 23:24:48 +08:00
|
|
|
log (job) {
|
|
|
|
return job.log(this.logger);
|
|
|
|
}
|
2016-09-29 21:09:36 +08:00
|
|
|
|
2018-05-23 23:24:48 +08:00
|
|
|
reopenFileStreams () {
|
|
|
|
this.logger.reopenFileStreams();
|
|
|
|
}
|
|
|
|
}
|
2016-09-29 21:09:36 +08:00
|
|
|
|
2018-05-23 23:24:48 +08:00
|
|
|
module.exports = BatchLogger;
|