Skip to content

Commit e012e20

Browse files
committed
fix: show console behavior
1 parent 07e5941 commit e012e20

File tree

4 files changed

+131
-140
lines changed

4 files changed

+131
-140
lines changed

packages/contentstack-config/src/commands/config/set/log.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default class LogSetCommand extends Command {
5353
}
5454

5555
if (flags['show-console-logs'] !== undefined) {
56-
currentLoggingConfig['show-console-logs'] = flags['show-console-logs'];
56+
currentLoggingConfig['showConsoleLogs'] = flags['show-console-logs'];
5757
}
5858
configHandler.set('log', currentLoggingConfig);
5959

@@ -67,7 +67,7 @@ export default class LogSetCommand extends Command {
6767

6868
if (flags['show-console-logs'] !== undefined) {
6969
cliux.success(
70-
messageHandler.parse('CLI_CONFIG_LOG_CONSOLE_SET', String(currentLoggingConfig['show-console-logs'])),
70+
messageHandler.parse('CLI_CONFIG_LOG_CONSOLE_SET', String(currentLoggingConfig['showConsoleLogs'])),
7171
);
7272
}
7373
cliux.success(messageHandler.parse('CLI_CONFIG_LOG_SET_SUCCESS'));

packages/contentstack-config/src/utils/log-config-defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function resolveLogPath(logPath: string): string {
2626
export function getEffectiveLogConfig(currentConfig: any = {}) {
2727
const logLevel = currentConfig?.level || LOG_CONFIG_DEFAULTS.LEVEL;
2828
const logPath = resolveLogPath(currentConfig?.path || LOG_CONFIG_DEFAULTS.PATH);
29-
const showConsoleLogs = currentConfig?.['show-console-logs'] ?? LOG_CONFIG_DEFAULTS.SHOW_CONSOLE_LOGS;
29+
const showConsoleLogs = currentConfig?.['showConsoleLogs'] ?? LOG_CONFIG_DEFAULTS.SHOW_CONSOLE_LOGS;
3030

3131
return {
3232
level: logLevel,

0 commit comments

Comments
 (0)