From 4557cf626f23cfcd5d140b6706ba02e66faccaf4 Mon Sep 17 00:00:00 2001 From: Cameron Diver Date: Tue, 30 Apr 2019 13:00:52 +0100 Subject: [PATCH] Improve logging for detached mode + livepush Change-type: patch Closes: #1196 Signed-off-by: Cameron Diver --- lib/utils/device/deploy.ts | 6 +++++- lib/utils/device/live.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/utils/device/deploy.ts b/lib/utils/device/deploy.ts index 849a7372..54369daf 100644 --- a/lib/utils/device/deploy.ts +++ b/lib/utils/device/deploy.ts @@ -164,7 +164,6 @@ export async function deployToDevice(opts: DeviceDeployOptions): Promise { 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 { 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) { diff --git a/lib/utils/device/live.ts b/lib/utils/device/live.ts index 00f1f2ca..d2a104e2 100644 --- a/lib/utils/device/live.ts +++ b/lib/utils/device/live.ts @@ -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)) {