Skip to content

Commit a4d4e36

Browse files
authored
fix: remove logs of 'argv' and 'context.config' (#2378)
Signed-off-by: Zhan Milenkov <[email protected]>
1 parent 61b6376 commit a4d4e36

File tree

7 files changed

+2
-39
lines changed

7 files changed

+2
-39
lines changed

src/commands/account.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ export class AccountCommand extends BaseCommand {
277277
// set config in the context for later tasks to use
278278
context_.config = config;
279279

280-
self.logger.debug('Initialized config', {config});
281-
282280
await self.accountManager.loadNodeClient(
283281
config.namespace,
284282
self.remoteConfig.getClusterRefs(),
@@ -521,8 +519,6 @@ export class AccountCommand extends BaseCommand {
521519
// set config in the context for later tasks to use
522520
context_.config = config;
523521

524-
self.logger.debug('Initialized config', {config});
525-
526522
await self.accountManager.loadNodeClient(
527523
context_.config.namespace,
528524
self.remoteConfig.getClusterRefs(),
@@ -621,8 +617,6 @@ export class AccountCommand extends BaseCommand {
621617
config.deployment,
622618
self.configManager.getFlag<boolean>(flags.forcePortForward),
623619
);
624-
625-
self.logger.debug('Initialized config', {config});
626620
},
627621
},
628622
{
@@ -726,8 +720,6 @@ export class AccountCommand extends BaseCommand {
726720
config.deployment,
727721
self.configManager.getFlag<boolean>(flags.forcePortForward),
728722
);
729-
730-
self.logger.debug('Initialized config', {config});
731723
},
732724
},
733725
{

src/commands/block-node.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ export class BlockNodeCommand extends BaseCommand {
238238

239239
context_.config.context = this.remoteConfig.getClusterRefs()[context_.config.clusterRef];
240240

241-
this.logger.debug('Initialized config', {config: context_.config});
242-
243241
return ListrLock.newAcquireLockTask(lease, task);
244242
},
245243
},
@@ -432,8 +430,6 @@ export class BlockNodeCommand extends BaseCommand {
432430
}
433431
}
434432

435-
this.logger.debug('Initialized config', {config: context_.config});
436-
437433
return ListrLock.newAcquireLockTask(lease, task);
438434
},
439435
},
@@ -522,8 +518,6 @@ export class BlockNodeCommand extends BaseCommand {
522518

523519
context_.config.context = this.remoteConfig.getClusterRefs()[context_.config.clusterRef];
524520

525-
this.logger.debug('Initialized config', {config: context_.config});
526-
527521
return ListrLock.newAcquireLockTask(lease, task);
528522
},
529523
},

src/commands/cluster/configs.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ export class ClusterCommandConfigs {
110110
clusterRef: configManager.getFlag<ClusterReferenceName>(flags.clusterRef),
111111
} as ClusterReferenceSetupConfigClass;
112112

113-
this.logger.debug('Prepare ctx.config', {config: context_.config, argv});
114-
115113
context_.config.context =
116114
this.localConfig.configuration.clusterRefs.get(context_.config.clusterRef)?.toString() ??
117115
this.k8Factory.default().contexts().readCurrent();

src/commands/deployment.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ export class DeploymentCommand extends BaseCommand {
144144
) {
145145
throw new SoloError(ErrorMessages.DEPLOYMENT_NAME_ALREADY_EXISTS(context_.config.deployment));
146146
}
147-
148-
self.logger.debug('Prepared config', {config: context_.config, cachedConfig: self.configManager.config});
149147
},
150148
},
151149
{
@@ -228,8 +226,6 @@ export class DeploymentCommand extends BaseCommand {
228226
) {
229227
throw new SoloError(ErrorMessages.DEPLOYMENT_NAME_ALREADY_EXISTS(context_.config.deployment));
230228
}
231-
232-
self.logger.debug('Prepared config', {config: context_.config, cachedConfig: self.configManager.config});
233229
},
234230
},
235231
{
@@ -335,13 +331,10 @@ export class DeploymentCommand extends BaseCommand {
335331
await self.localConfig.load();
336332

337333
self.configManager.update(argv);
338-
self.logger.debug('Updated config with argv', {config: self.configManager.config});
339334
await self.configManager.executePrompt(task, [flags.clusterRef]);
340335
context_.config = {
341336
clusterName: self.configManager.getFlag<ClusterReferenceName>(flags.clusterRef),
342337
} as Config;
343-
344-
self.logger.debug('Prepared config', {config: context_.config, cachedConfig: self.configManager.config});
345338
},
346339
},
347340
{
@@ -525,8 +518,6 @@ export class DeploymentCommand extends BaseCommand {
525518
nodeAliases: [] as NodeAliases,
526519
context: '',
527520
};
528-
529-
this.logger.debug('Prepared config', {config: context_.config, cachedConfig: this.configManager.config});
530521
},
531522
};
532523
}

src/commands/network.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ export class NetworkCommand extends BaseCommand {
652652
argv: ArgvStruct,
653653
): Promise<NetworkDeployConfigClass> {
654654
this.configManager.update(argv);
655-
this.logger.debug('Updated config with argv', {config: this.configManager.config});
656655

657656
const flagsWithDisabledPrompts: CommandFlag[] = [
658657
flags.apiPermissionProperties,
@@ -780,10 +779,6 @@ export class NetworkCommand extends BaseCommand {
780779
this.logger.debug('Preparing storage secrets');
781780
await this.prepareStorageSecrets(config);
782781

783-
this.logger.debug('Prepared config', {
784-
config,
785-
cachedConfig: this.configManager.config,
786-
});
787782
return config;
788783
}
789784

src/commands/node/tasks.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,8 +2773,6 @@ export class NodeCommandTasks {
27732773
}
27742774
}
27752775

2776-
this.logger.debug('Initialized config', {config});
2777-
27782776
if (lease) {
27792777
return ListrLock.newAcquireLockTask(lease, task);
27802778
}

src/commands/relay.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ export class RelayCommand extends BaseCommand {
321321
}
322322
}
323323

324-
self.logger.debug('Initialized config', {config: context_.config});
325-
326324
return ListrLock.newAcquireLockTask(lease, task);
327325
},
328326
},
@@ -531,8 +529,6 @@ export class RelayCommand extends BaseCommand {
531529
context_.config.context,
532530
);
533531

534-
self.logger.debug('Initialized config', {config: context_.config});
535-
536532
return ListrLock.newAcquireLockTask(lease, task);
537533
},
538534
},
@@ -584,7 +580,7 @@ export class RelayCommand extends BaseCommand {
584580
flags.setOptionalCommandFlags(y, ...RelayCommand.DEPLOY_FLAGS_LIST.optional);
585581
},
586582
handler: async (argv: ArgvStruct) => {
587-
self.logger.info("==== Running 'relay deploy' ===", {argv});
583+
self.logger.info("==== Running 'relay deploy' ===");
588584

589585
await self.deploy(argv).then(r => {
590586
self.logger.info('==== Finished running `relay deploy`====');
@@ -602,8 +598,7 @@ export class RelayCommand extends BaseCommand {
602598
flags.setOptionalCommandFlags(y, ...RelayCommand.DESTROY_FLAGS_LIST.optional);
603599
},
604600
handler: async (argv: ArgvStruct) => {
605-
self.logger.info("==== Running 'relay destroy' ===", {argv});
606-
self.logger.debug(argv);
601+
self.logger.info("==== Running 'relay destroy' ===");
607602

608603
await self.destroy(argv).then(r => {
609604
self.logger.info('==== Finished running `relay destroy`====');

0 commit comments

Comments
 (0)