Skip to content

Commit 78314ad

Browse files
authored
Merge pull request #2118 from contentstack/feat/DX-3481
feat: added error section for summarizing failure events
2 parents 0d632e7 + e012e20 commit 78314ad

File tree

17 files changed

+363
-249
lines changed

17 files changed

+363
-249
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ export default class LogSetCommand extends Command {
4848
if (pathExt && pathExt.length > 0) {
4949
resolvedPath = path.dirname(resolvedPath);
5050
}
51-
51+
5252
currentLoggingConfig.path = resolvedPath;
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,9 +67,10 @@ 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
}
73+
cliux.success(messageHandler.parse('CLI_CONFIG_LOG_SET_SUCCESS'));
7374
} catch (error) {
7475
cliux.error('error', error);
7576
}

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)