Skip to content

Commit

Permalink
fix: add some logs if env is not found (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoadonia authored Nov 4, 2024
1 parent 95c72d8 commit 3994555
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/ten_utils/lib/sys/general/placeholder.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,14 @@ bool ten_placeholder_resolve(ten_placeholder_t *self,
// Environment variable not found, use default value.
if (!ten_value_is_valid(&self->default_value)) {
// If no default value is provided, use 'null' value.
TEN_LOGI(
"Environment variable %s is not found, neither default value is "
"provided, set property to null.",
variable_name);
ten_value_reset_to_null(placeholder_value);
} else {
TEN_LOGI("Environment variable %s is not found, using default value.",
variable_name);
const char *default_value =
ten_value_peek_raw_str(&self->default_value);
ten_value_reset_to_string_with_size(placeholder_value, default_value,
Expand Down

0 comments on commit 3994555

Please sign in to comment.