Skip to content

Commit f6b4b2d

Browse files
committed
debugging logging
1 parent cfe0581 commit f6b4b2d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/b2c-cli/src/commands/code/deploy.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ export default class CodeDeploy extends CartridgeCommand<typeof CodeDeploy> {
102102
this.error(t('commands.code.deploy.noCartridges', 'No cartridges found in {{path}}', {path: this.cartridgePath}));
103103
}
104104

105-
this.log(
105+
this.logger?.info(
106+
{path: this.cartridgePath, server: hostname, codeVersion: version},
106107
t('commands.code.deploy.deploying', 'Deploying {{path}} to {{hostname}} ({{version}})', {
107108
path: this.cartridgePath,
108109
hostname,
@@ -112,7 +113,7 @@ export default class CodeDeploy extends CartridgeCommand<typeof CodeDeploy> {
112113

113114
// Log found cartridges
114115
for (const c of cartridges) {
115-
this.logger?.debug(` ${c.name} (${c.src})`);
116+
this.logger?.debug({cartridgeName: c.name, path: c.src}, ` ${c.name}`);
116117
}
117118

118119
try {
@@ -141,7 +142,8 @@ export default class CodeDeploy extends CartridgeCommand<typeof CodeDeploy> {
141142
reloaded,
142143
};
143144

144-
this.log(
145+
this.logger?.info(
146+
{codeVersion: result.codeVersion, cartridgeCount: result.cartridges.length},
145147
t('commands.code.deploy.summary', 'Deployed {{count}} cartridge(s) to {{codeVersion}}', {
146148
count: result.cartridges.length,
147149
codeVersion: result.codeVersion,

packages/b2c-tooling-sdk/src/operations/code/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export async function uploadCartridges(instance: B2CInstance, cartridges: Cartri
178178
logger.debug('Temporary archive deleted');
179179

180180
logger.debug(
181-
{hostname: instance.config.hostname, codeVersion, cartridgeCount: cartridges.length},
181+
{server: instance.config.hostname, codeVersion, cartridgeCount: cartridges.length},
182182
`Uploaded ${cartridges.length} cartridges to ${instance.config.hostname}`,
183183
);
184184
}

0 commit comments

Comments
 (0)