Skip to content

Commit

Permalink
Pass expected name for enabling structured logging in providers (#558)
Browse files Browse the repository at this point in the history
* pass expected name for enabling structured logging in Rust providers

Signed-off-by: Connor Smith <[email protected]>

* parse flag as bool

Signed-off-by: Connor Smith <[email protected]>

---------

Signed-off-by: Connor Smith <[email protected]>
  • Loading branch information
connorsmith256 authored Mar 10, 2023
1 parent 9de7673 commit 8881fcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion host_core/lib/host_core/vhost/config_plan.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ defmodule HostCore.Vhost.ConfigPlan do
{:js_domain, "WASMCLOUD_JS_DOMAIN", required: false},
{:config_service_enabled, "WASMCLOUD_CONFIG_SERVICE",
required: false, map: &string_to_bool/1},
{:enable_structured_logging, "WASMCLOUD_STRUCTURED_LOGGING_ENABLED", required: false},
{:enable_structured_logging, "WASMCLOUD_STRUCTURED_LOGGING_ENABLED",
required: false, map: &string_to_bool/1},
{:structured_log_level, "WASMCLOUD_STRUCTURED_LOG_LEVEL",
required: false, map: &string_to_loglevel/1},
{:enable_ipv6, "WASMCLOUD_ENABLE_IPV6", required: false, map: &string_to_bool/1},
Expand Down
2 changes: 1 addition & 1 deletion host_core/lib/host_core/vhost/virtual_host.ex
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ defmodule HostCore.Vhost.VirtualHost do
invocation_seed: config.cluster_seed,
js_domain: config.js_domain,
# In case providers want to be aware of this for their own logging
enable_structured_logging: config.enable_structured_logging
structured_logging: config.enable_structured_logging
})
end

Expand Down

0 comments on commit 8881fcb

Please sign in to comment.