Skip to content

Commit

Permalink
fix: fix ten_env_log_formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Dec 3, 2024
1 parent 56f1e9a commit 8a82a8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@
"name": "app (C/C++) (lldb, launch)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/out/linux/x64/tests/ten_runtime/integration/cpp/graph_env_var_3/graph_env_var_3_app/bin/graph_env_var_3_app_source",
"program": "${workspaceFolder}/out/linux/x64/tests/ten_runtime/integration/cpp/hello_world/hello_world_app/bin/hello_world_app_source",
"args": [],
"cwd": "${workspaceFolder}/out/linux/x64/tests/ten_runtime/integration/cpp/graph_env_var_3/graph_env_var_3_app",
"cwd": "${workspaceFolder}/out/linux/x64/tests/ten_runtime/integration/cpp/hello_world/hello_world_app",
"env": {
"ASAN_OPTIONS": "use_sigaltstack=0",
},
Expand Down
7 changes: 4 additions & 3 deletions core/src/ten_runtime/addon/protocol/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ bool ten_addon_create_protocol_with_uri(
if (!addon_host) {
TEN_ENV_LOG_ERROR_INTERNAL(
ten_env,
"Can not handle protocol '%s' because no addon installed for it", uri);
"Failed to handle protocol '%s' because no addon installed for it",
uri);
ten_string_destroy(protocol_str);

if (err) {
Expand All @@ -208,8 +209,8 @@ bool ten_addon_create_protocol_with_uri(
return false;
}

TEN_ENV_LOG_ERROR_INTERNAL(ten_env, "Loading protocol addon: %s",
ten_string_get_raw_str(&addon_host->name));
TEN_ENV_LOG_INFO_INTERNAL(ten_env, "Loading protocol addon: %s",
ten_string_get_raw_str(&addon_host->name));

ten_string_destroy(protocol_str);

Expand Down
6 changes: 3 additions & 3 deletions core/src/ten_runtime/ten_env/internal/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ void ten_env_log_formatted(ten_env_t *self, TEN_LOG_LEVEL level,
va_list ap;
va_start(ap, fmt);

ten_env_log_with_size_formatted(self, level, func_name, strlen(func_name),
file_name, strlen(file_name), line_no, fmt,
ap);
ten_env_log_with_size_formatted_internal(
self, level, func_name, strlen(func_name), file_name, strlen(file_name),
line_no, true, fmt, ap);

va_end(ap);
}

0 comments on commit 8a82a8d

Please sign in to comment.