Skip to content

Commit 3f99b60

Browse files
committed
add logic to dump extract platform log
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
1 parent cd3d8e4 commit 3f99b60

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/core/platform-installer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ export class PlatformInstaller {
126126

127127
return true;
128128
} catch (error) {
129+
const logFile: string = `${constants.HEDERA_HAPI_PATH}/output/extract-platform.log`;
130+
const response = await this.k8Factory
131+
.getK8(context)
132+
.containers()
133+
.readByRef(ContainerReference.of(podReference, constants.ROOT_CONTAINER))
134+
.execContainer(['bash', '-c', `cat ${logFile} || echo "Log file not found or empty"`]);
135+
this.logger.showUser(`Log file content from ${logFile}:\n${response}`);
136+
129137
const message: string = `failed to extract platform code in this pod '${podReference}' while using the '${context}' context: ${error.message}`;
130138
throw new SoloError(message, error);
131139
}

0 commit comments

Comments
 (0)