mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-18 21:27:54 +00:00
Modify log monitor logging to be more generic
Includes other host services in addition to balena.service Signed-off-by: Christina Ying Wang <christina@balena.io>
This commit is contained in:
parent
5ee5db2a04
commit
e62e245fc7
@ -81,7 +81,7 @@ class LogMonitor {
|
||||
}
|
||||
|
||||
stderr?.on('data', (data) =>
|
||||
log.error('journalctl - balena.service stderr: ', data.toString()),
|
||||
log.error('Journalctl process stderr: ', data.toString()),
|
||||
);
|
||||
|
||||
const self = this;
|
||||
@ -102,9 +102,9 @@ class LogMonitor {
|
||||
}
|
||||
}
|
||||
});
|
||||
log.debug('balena.service journalctl process exit.');
|
||||
log.debug('Journalctl process exit.');
|
||||
} catch (e: any) {
|
||||
log.error('journalctl - balena.service error: ', e.message ?? e);
|
||||
log.error('Journalctl process error: ', e.message ?? e);
|
||||
}
|
||||
|
||||
// On exit of process try to create another
|
||||
@ -113,9 +113,7 @@ class LogMonitor {
|
||||
JOURNALCTL_ERROR_RETRY_DELAY_MAX,
|
||||
);
|
||||
log.debug(
|
||||
`Spawning another process to watch balena.service logs in ${
|
||||
wait / 1000
|
||||
}s`,
|
||||
`Spawning another process to watch journal logs in ${wait / 1000}s`,
|
||||
);
|
||||
await setTimeout(wait);
|
||||
void this.start();
|
||||
|
Loading…
Reference in New Issue
Block a user