@@ -69,10 +69,11 @@ export async function resolve_glob_patterns(
6969 }
7070 } )
7171 } catch ( error ) {
72- console . warn (
73- `Failed to resolve glob pattern "${ normalized_pattern } ":` ,
74- error
75- )
72+ Logger . warn ( {
73+ function_name : 'resolve_glob_patterns' ,
74+ message : `Failed to resolve glob pattern "${ normalized_pattern } "` ,
75+ data : error
76+ } )
7677 }
7778 }
7879
@@ -127,9 +128,10 @@ async function apply_saved_context(
127128 if ( root ) {
128129 resolved_path_part = path . join ( root , relative_path )
129130 } else {
130- console . warn (
131- `Unknown workspace prefix "${ prefix } " in path "${ path_part } ". Treating as relative to current workspace root.`
132- )
131+ Logger . warn ( {
132+ function_name : 'apply_saved_context' ,
133+ message : `Unknown workspace prefix "${ prefix } " in path "${ path_part } ". Treating as relative to current workspace root.`
134+ } )
133135 resolved_path_part = path . join ( workspace_root , relative_path )
134136 }
135137 } else {
@@ -305,7 +307,11 @@ async function load_and_merge_file_contexts(): Promise<{
305307 }
306308 }
307309 } catch ( error : any ) {
308- console . error ( `Error reading contexts file from ${ folder . name } :` , error )
310+ Logger . error ( {
311+ function_name : 'load_and_merge_file_contexts' ,
312+ message : `Error reading contexts file from ${ folder . name } ` ,
313+ data : error
314+ } )
309315 }
310316 }
311317
@@ -665,10 +671,11 @@ export function apply_context_command(
665671 error . message
666672 )
667673 )
668- console . error (
669- 'Error updating context name in file:' ,
670- error
671- )
674+ Logger . error ( {
675+ function_name : 'apply_context_command' ,
676+ message : 'Error updating context name in file' ,
677+ data : error
678+ } )
672679 success = false
673680 break
674681 }
@@ -902,10 +909,11 @@ export function apply_context_command(
902909 selected . label
903910 )
904911 )
905- console . error (
906- 'Could not find selected context after potential edits:' ,
907- selected . label
908- )
912+ Logger . error ( {
913+ function_name : 'apply_context_command' ,
914+ message : 'Could not find selected context after potential edits' ,
915+ data : selected . label
916+ } )
909917 return
910918 }
911919
@@ -928,7 +936,11 @@ export function apply_context_command(
928936 error . message
929937 )
930938 )
931- console . error ( 'Error selecting saved context:' , error )
939+ Logger . error ( {
940+ function_name : 'apply_context_command' ,
941+ message : 'Error selecting saved context' ,
942+ data : error
943+ } )
932944 }
933945 }
934946 }
0 commit comments