@@ -10,9 +10,8 @@ import {
1010 TableFlags ,
1111 TableHeader ,
1212 log ,
13- configHandler ,
13+ isConsoleLogEnabled ,
1414 CLIProgressManager ,
15- clearProgressModuleSetting ,
1615 readContentTypeSchemas ,
1716 readGlobalFieldSchemas ,
1817 generateUid ,
@@ -73,15 +72,6 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
7372 async start ( command : CommandNames ) : Promise < boolean > {
7473 this . currentCommand = command ;
7574
76- // Set progress supported module and console logs setting BEFORE any log calls
77- // This ensures the logger respects the setting when it's initialized
78- const logConfig = configHandler . get ( 'log' ) || { } ;
79- // Default to false so progress bars are shown instead of console logs
80- if ( logConfig . showConsoleLogs === undefined ) {
81- configHandler . set ( 'log.showConsoleLogs' , false ) ;
82- }
83- configHandler . set ( 'log.progressSupportedModule' , 'audit' ) ;
84-
8575 // Initialize global summary for progress tracking
8676 CLIProgressManager . initializeGlobalSummary ( 'AUDIT' , '' , 'Auditing content...' ) ;
8777
@@ -190,9 +180,6 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
190180 // Print comprehensive summary at the end (commented out - Summary table above has the counts; progress bars show completion)
191181 // CLIProgressManager.printGlobalSummary();
192182
193- // Clear progress module setting now that audit is complete
194- clearProgressModuleSetting ( ) ;
195-
196183 return (
197184 ! isEmpty ( missingCtRefs ) ||
198185 ! isEmpty ( missingGfRefs ) ||
@@ -263,9 +250,8 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
263250 let dataModuleWise : Record < string , any > = await new ModuleDataReader ( cloneDeep ( constructorParam ) ) . run ( ) ;
264251 log . debug ( `Data module wise: ${ JSON . stringify ( dataModuleWise ) } ` , this . auditContext ) ;
265252
266- // Extract logConfig and showConsoleLogs once before the loop to reuse throughout
267- const logConfig = configHandler . get ( 'log' ) || { } ;
268- const showConsoleLogs = logConfig . showConsoleLogs ?? false ;
253+ // Resolve the console-log policy once before the loop to reuse throughout
254+ const showConsoleLogs = isConsoleLogEnabled ( ) ;
269255
270256 for ( const module of this . sharedConfig . flags . modules || this . sharedConfig . modules ) {
271257 // Update audit context with current module
0 commit comments