Improve logging for detached mode + livepush

Change-type: patch
Closes: #1196
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-04-30 13:00:52 +01:00
parent 8c68aaad49
commit 4557cf626f
No known key found for this signature in database
GPG Key ID: 49690ED87032539F
2 changed files with 8 additions and 2 deletions

View File

@ -164,7 +164,6 @@ export async function deployToDevice(opts: DeviceDeployOptions): Promise<void> {
deployOpts: opts,
});
globalLogger.logLivepush('Watching for file changes...');
const promises = [livepush.init()];
// Only show logs if we're not detaching
if (!opts.detached) {
@ -174,7 +173,12 @@ export async function deployToDevice(opts: DeviceDeployOptions): Promise<void> {
promises.push(
displayDeviceLogs(logStream, globalLogger, opts.system, opts.service),
);
} else {
globalLogger.logLivepush(
'Running in detached mode, no service logs will be shown',
);
}
globalLogger.logLivepush('Watching for file changes...');
await Promise.all(promises);
} else {
if (opts.detached) {

View File

@ -81,7 +81,9 @@ export class LivepushManager {
// so that all of the containers are running and ready to
// be livepush'd into
await this.awaitDeviceStateSettle();
// Split the composition into a load of differents paths which we can
// Split the composition into a load of differents paths
// which we can
this.logger.logLivepush('Device state settled');
// create livepush instances for
for (const serviceName of _.keys(this.composition.services)) {