Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fileignoreconfig:
- filename: pnpm-lock.yaml
checksum: 0c320557538f6b52f375b13221323d8700692a45e744128788785f27e7c72f73
checksum: 0bfb05bb772a26be604bab6c93a58f93bcdc564b26547a1e8365222a679ae23d
- filename: packages/contentstack-import/test/integration/auth-token-modules/environments.test.js
checksum: bc6f06b75d082aaf99e2f2f4b932b143765e2f14086967fb8973fe1b2ca6c03e
- filename: packages/contentstack-import/test/integration/environments.test.js
Expand Down
233 changes: 233 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/contentstack-config/src/commands/config/get/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ export default class LogGetCommand extends Command {
const currentLoggingConfig = configHandler.get('log') || {};
const logLevel = currentLoggingConfig?.level;
const logPath = currentLoggingConfig?.path;
const showConsoleLogs = currentLoggingConfig?.showConsoleLogs;

if (logLevel || logPath) {
const logConfigList = [
{
'Log Level': logLevel || 'Not set',
'Log Path': logPath || 'Not set',
'Show Console Logs': showConsoleLogs !== undefined ? String(showConsoleLogs) : 'Not set',
},
];

const headers: TableHeader[] = [
{ value: 'Log Level' },
{ value: 'Log Path' },
{ value: 'Show Console Logs' },
];

cliux.table(headers, logConfigList);
Expand Down
7 changes: 4 additions & 3 deletions packages/contentstack-config/src/commands/config/set/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export default class LogSetCommand extends Command {
let logLevel: string = flags['level'];
let logPath: string = flags['path'];
const showConsoleLogs: boolean = flags['show-console-logs'];

const currentLoggingConfig = configHandler.get('log') || {};
logLevel = logLevel || currentLoggingConfig?.level;
logPath = logPath || currentLoggingConfig?.path;
// Interactive prompts if not passed via flags
if (!logLevel) {
logLevel = await interactive.askLogLevel();
Expand All @@ -44,10 +46,9 @@ export default class LogSetCommand extends Command {
logPath = await interactive.askLogPath();
}

const currentLoggingConfig = configHandler.get('log') || {};
if (logLevel) currentLoggingConfig.level = logLevel;
if (logPath) currentLoggingConfig.path = logPath;
currentLoggingConfig['show-console-logs'] = showConsoleLogs;
currentLoggingConfig.showConsoleLogs = showConsoleLogs;

configHandler.set('log', currentLoggingConfig);

Expand Down
Loading
Loading