Skip to content

Commit 814d10f

Browse files
committed
Update logger function names to match their actual implementation contexts
1 parent f9e9af6 commit 814d10f

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎apps/editor/src/commands/apply-context-command/sources/json-file-source.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export const handle_json_file_source = async (
432432
dictionary.error_message.ERROR_SELECTING_SAVED_CONTEXT(error.message)
433433
)
434434
Logger.error({
435-
function_name: 'apply_context_command',
435+
function_name: 'handle_json_file_source',
436436
message: 'Error selecting saved context',
437437
data: error
438438
})

‎apps/editor/src/commands/apply-context-command/sources/unstaged-files-source.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export const handle_unstaged_files_source = async (
248248
)
249249
)
250250
Logger.error({
251-
function_name: 'apply_context_command:unstaged',
251+
function_name: 'handle_unstaged_files_source',
252252
message: 'Failed to select unstaged files',
253253
data: error
254254
})

‎apps/editor/src/commands/apply-context-command/sources/workspace-state-source.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export const handle_workspace_state_source = async (
489489
)
490490
)
491491
Logger.error({
492-
function_name: 'apply_context_command',
492+
function_name: 'handle_workspace_state_source',
493493
message: 'Could not find selected context after potential edits',
494494
data: selected.label
495495
})
@@ -538,7 +538,7 @@ export const handle_workspace_state_source = async (
538538
dictionary.error_message.ERROR_SELECTING_SAVED_CONTEXT(error.message)
539539
)
540540
Logger.error({
541-
function_name: 'apply_context_command',
541+
function_name: 'handle_workspace_state_source',
542542
message: 'Error selecting saved context',
543543
data: error
544544
})

‎apps/editor/src/context/providers/workspace/workspace-provider.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ export class WorkspaceProvider
992992
}
993993
} catch (error) {
994994
Logger.error({
995-
function_name: 'get_files_and_directories',
995+
function_name: '_get_files_and_directories',
996996
message: `Error reading directory ${dir_path}`,
997997
data: error
998998
})
@@ -1134,7 +1134,7 @@ export class WorkspaceProvider
11341134
}
11351135
} catch (error) {
11361136
Logger.error({
1137-
function_name: 'update_parent_state',
1137+
function_name: '_update_parent_state',
11381138
message: `Error updating parent state for ${dir_path}`,
11391139
data: error
11401140
})
@@ -1216,7 +1216,7 @@ export class WorkspaceProvider
12161216
}
12171217
} catch (error) {
12181218
Logger.error({
1219-
function_name: 'update_directory_check_state',
1219+
function_name: '_update_directory_check_state',
12201220
message: `Error updating directory check state for ${dir_path}`,
12211221
data: error
12221222
})
@@ -1354,7 +1354,7 @@ export class WorkspaceProvider
13541354
this._combined_gitignore.add(rules_with_prefix)
13551355
} catch (error) {
13561356
Logger.error({
1357-
function_name: 'load_all_gitignore_files',
1357+
function_name: '_load_all_gitignore_files',
13581358
message: `Error reading ignore file at ${gitignore_path}`,
13591359
data: error
13601360
})

‎apps/editor/src/services/websocket-manager.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class WebSocketManager {
7575
this._connect_as_client()
7676
} catch (error) {
7777
Logger.error({
78-
function_name: 'initialize_server',
78+
function_name: '_initialize_server',
7979
message: 'Error initializing WebSocket server',
8080
data: error
8181
})
@@ -152,7 +152,7 @@ export class WebSocketManager {
152152

153153
this.client.on('open', () => {
154154
Logger.info({
155-
function_name: 'connect_to_server',
155+
function_name: '_connect_as_client',
156156
message: 'Connected to WebSocket server'
157157
})
158158
})
@@ -161,7 +161,7 @@ export class WebSocketManager {
161161
try {
162162
const message = JSON.parse(data.toString())
163163
Logger.info({
164-
function_name: 'connect_to_server',
164+
function_name: '_connect_as_client',
165165
message: 'Incoming WS message',
166166
data: message
167167
})
@@ -197,7 +197,7 @@ export class WebSocketManager {
197197
}
198198
} catch (error) {
199199
Logger.error({
200-
function_name: 'connect_to_server',
200+
function_name: '_connect_as_client',
201201
message: 'Error processing message',
202202
data: error
203203
})
@@ -206,7 +206,7 @@ export class WebSocketManager {
206206

207207
this.client.on('error', (error) => {
208208
Logger.error({
209-
function_name: 'connect_to_server',
209+
function_name: '_connect_as_client',
210210
message: 'WebSocket client error',
211211
data: error
212212
})
@@ -220,7 +220,7 @@ export class WebSocketManager {
220220

221221
this.client.on('close', () => {
222222
Logger.warn({
223-
function_name: 'connect_to_server',
223+
function_name: '_connect_as_client',
224224
message: 'Disconnected from WebSocket server'
225225
})
226226
this.has_connected_browsers = false

‎apps/editor/src/views/panel/backend/utils/replace-git-symbols.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const replace_changes_symbol = async (params: {
183183
)
184184
)
185185
Logger.error({
186-
function_name: 'replace_changes_placeholder',
186+
function_name: 'replace_changes_symbol',
187187
message: `Error getting diff from branch ${branch_name} in folder ${folder_name}`,
188188
data: error
189189
})
@@ -250,7 +250,7 @@ export const replace_changes_symbol = async (params: {
250250
)
251251
)
252252
Logger.error({
253-
function_name: 'replace_changes_placeholder',
253+
function_name: 'replace_changes_symbol',
254254
message: `Error getting diff from branch ${branch_name}`,
255255
data: error
256256
})
@@ -403,7 +403,7 @@ export const replace_commit_symbol = async (params: {
403403
dictionary.error_message.FAILED_TO_GET_DIFF_FOR_COMMIT(commit_hash)
404404
)
405405
Logger.error({
406-
function_name: 'replace_commit_placeholder',
406+
function_name: 'replace_commit_symbol',
407407
message: `Error getting diff for commit ${commit_hash}`,
408408
data: error
409409
})

0 commit comments

Comments
 (0)