@@ -65,9 +65,9 @@ function hashify(obj) {
6565}
6666
6767function notifyWatcherIssue ( limit ) {
68- console . log ( 'Ran out of file handles after watching %s files.' , limit ) ;
69- console . log ( 'Falling back to polling which uses more CPU.' ) ;
70- console . log ( 'Run ulimit -n 10000 to increase the limit for open files.' ) ;
68+ afLogger . info ( 'Ran out of file handles after watching %s files.' , limit ) ;
69+ afLogger . info ( 'Falling back to polling which uses more CPU.' ) ;
70+ afLogger . info ( 'Run ulimit -n 10000 to increase the limit for open files.' ) ;
7171}
7272
7373class CodeInjector implements ICodeInjector {
@@ -92,7 +92,7 @@ class CodeInjector implements ICodeInjector {
9292 }
9393
9494 cleanup ( ) {
95- console . log ( 'Cleaning up...' ) ;
95+ afLogger . info ( 'Cleaning up...' ) ;
9696 this . allWatchers . forEach ( ( watcher ) => {
9797 watcher . removeAll ( ) ;
9898 } ) ;
@@ -108,14 +108,6 @@ class CodeInjector implements ICodeInjector {
108108
109109 }
110110
111- // async runShell({ command }) {
112- // console.log(`⚙️ Running shell ${command}...`);
113- // console.time(`${command} done in`);
114- // const { stdout: out, stderr: err } = await execAsync(command);
115- // console.timeEnd(`${command} done in`);
116- // console.log(`Command ${command} output:`, out, err);
117- // }
118-
119111 async runNpmShell ( { command, cwd, envOverrides = { } } : {
120112 command : string ,
121113 cwd : string ,
@@ -511,7 +503,6 @@ class CodeInjector implements ICodeInjector {
511503 this . allComponentNames [ filePath ] = componentName ;
512504 } ) ;
513505
514- // console.log('🔧 Injecting code into Vue sources...', this.allComponentNames);
515506
516507 let customComponentsImports = '' ;
517508 for ( const [ targetPath , component ] of Object . entries ( this . allComponentNames ) ) {
@@ -859,7 +850,7 @@ class CodeInjector implements ICodeInjector {
859850 }
860851
861852 async bundleNow ( { hotReload = false } : { hotReload : boolean } ) {
862- console . log ( `${ this . adminforth . formatAdminForth ( ) } Bundling ${ hotReload ? 'and listening for changes (🔥 Hotreload)' : ' (no hot reload)' } ` ) ;
853+ afLogger . info ( `${ this . adminforth . formatAdminForth ( ) } Bundling ${ hotReload ? 'and listening for changes (🔥 Hotreload)' : ' (no hot reload)' } ` ) ;
863854 this . adminforth . runningHotReload = hotReload ;
864855
865856 await this . prepareSources ( ) ;
@@ -917,7 +908,7 @@ class CodeInjector implements ICodeInjector {
917908 // save hash
918909 await fs . promises . writeFile ( path . join ( serveDir , '.adminforth_messages_hash' ) , sourcesHash ) ;
919910 } else {
920- console . log ( `AdminForth i18n message extraction skipped — build already performed for the current sources.` ) ;
911+ afLogger . info ( `AdminForth i18n message extraction skipped — build already performed for the current sources.` ) ;
921912 }
922913
923914 if ( ! hotReload ) {
@@ -932,14 +923,14 @@ class CodeInjector implements ICodeInjector {
932923 // save hash
933924 await fs . promises . writeFile ( path . join ( serveDir , '.adminforth_build_hash' ) , sourcesHash ) ;
934925 } else {
935- console . log ( `Skipping AdminForth SPA bundling - already completed for the current sources.` ) ;
926+ afLogger . info ( `Skipping AdminForth SPA bundling - already completed for the current sources.` ) ;
936927 }
937928 } else {
938929
939930 const command = 'run dev' ;
940- console . log ( `⚙️ spawn: npm ${ command } ...` ) ;
931+ afLogger . info ( `⚙️ spawn: npm ${ command } ...` ) ;
941932 if ( process . env . VITE_ADMINFORTH_PUBLIC_PATH ) {
942- console . log ( '⚠️ Your VITE_ADMINFORTH_PUBLIC_PATH:' , process . env . VITE_ADMINFORTH_PUBLIC_PATH , 'has no effect' ) ;
933+ afLogger . info ( '⚠️ Your VITE_ADMINFORTH_PUBLIC_PATH:' , process . env . VITE_ADMINFORTH_PUBLIC_PATH , 'has no effect' ) ;
943934 }
944935 const env = {
945936 VITE_ADMINFORTH_PUBLIC_PATH : this . adminforth . config . baseUrl ,
0 commit comments