移除console

This commit is contained in:
hanhh 2021-08-20 14:26:12 +08:00
parent 5b21a6e529
commit f34980b173

View File

@ -252,13 +252,11 @@ export default class CronService {
{ $set: { status: CrontabStatus.running, pid: cp.pid } }, { $set: { status: CrontabStatus.running, pid: cp.pid } },
); );
cp.stderr.on('data', (data) => { cp.stderr.on('data', (data) => {
this.logger.info(`stderr: ${data}`);
if (log_path) { if (log_path) {
fs.appendFileSync(`${log_path}`, `${data}`); fs.appendFileSync(`${log_path}`, `${data}`);
} }
}); });
cp.on('error', (err) => { cp.on('error', (err) => {
this.logger.info(`err: ${err}`);
if (log_path) { if (log_path) {
fs.appendFileSync(`${log_path}`, `${JSON.stringify(err)}`); fs.appendFileSync(`${log_path}`, `${JSON.stringify(err)}`);
} }