Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(host): set log_level for providers #1502

Merged

Conversation

connorsmith256
Copy link
Contributor

Feature or Problem

This sets the log_level in the HostData, allowing providers built using the new SDK to inherit their logging level from the host

This should not be merged before v0.82 of the host is released

Related Issues

Resolves #1487

Release Information

1.0, since this will break legacy wasmbus-rpc providers

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

See the subscribing for debug logs from the provider binary:

./target/debug/wasmcloud --log-level debug --allow-file-load
2024-02-12T22:28:16.389792Z DEBUG new: wasmcloud_host::wasmbus: adding cluster key to cluster issuers cluster_pub_key="CBW56ENZ3AWPAKOHVUELI7SD6PYNHF7WLNNWAX2VI7QHCKI2JDNFACLP"
2024-02-12T22:28:16.390373Z DEBUG new: wasmcloud_host::wasmbus: connecting to NATS control server ctl_nats_url="nats://127.0.0.1:4222"
2024-02-12T22:28:16.390496Z DEBUG new: wasmcloud_host::wasmbus: connecting to NATS RPC server rpc_nats_url="nats://127.0.0.1:4222"
2024-02-12T22:28:16.392418Z  INFO async_nats::options: event: connected
2024-02-12T22:28:16.392419Z  INFO async_nats::options: event: connected
2024-02-12T22:28:16.393718Z  INFO new:create_bucket: wasmcloud_host::wasmbus: bucket already exists. Skipping creation. bucket=LATTICEDATA_default
2024-02-12T22:28:16.394059Z  INFO new:create_bucket: wasmcloud_host::wasmbus: bucket already exists. Skipping creation. bucket=CONFIGDATA_default
2024-02-12T22:28:16.395861Z DEBUG new:process_claims_put: wasmcloud_host::wasmbus: process claim entry put pubkey="VAG3QITQQ2ODAOWB5TTQSDJ53XK3SHBEIFNK4AYJ5RKAX2UNSCAPHA5M"
2024-02-12T22:28:16.396289Z DEBUG new:process_claims_put: wasmcloud_host::wasmbus: process claim entry put pubkey="VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5"
2024-02-12T22:28:16.396643Z  INFO new:process_linkdef_put: wasmcloud_host::wasmbus: process link definition entry put actor_id="MBLXMMR4HJK6IC4N5PCR5SZ233L74UKENCZX33Y2CZGMHUHJHZKUBCES" provider_id="VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5" link_name="default" contract_id="wasmcloud:httpserver"
2024-02-12T22:28:16.397471Z  INFO new: wasmcloud_host::wasmbus: wasmCloud host started host_id="NCPNIEJ4AMWEVI3L6OYEURW5XAAPLA7SXZR3MCVG6CCGT4RHFAIU7MNC"
2024-02-12T22:28:21.021293Z  INFO handle_auction_provider: wasmcloud_host::wasmbus: handling auction for provider provider_ref="file:///Users/connor/Documents/wasmCloud/wasmCloud/crates/providers/target/debug/httpserver.par.gz" link_name="default" constraints={}
2024-02-12T22:28:23.024605Z  INFO handle_launch_provider: wasmcloud_host::wasmbus: handling launch provider provider_ref="file:///Users/connor/Documents/wasmCloud/wasmCloud/crates/providers/target/debug/httpserver.par.gz" link_name="default"
2024-02-12T22:28:23.947234Z DEBUG process_claims_put: wasmcloud_host::wasmbus: process claim entry put pubkey="VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5"
2024-02-12T22:28:23.949058Z  INFO handle_launch_provider_task: wasmcloud_host::wasmbus: provider started provider_ref="file:///Users/connor/Documents/wasmCloud/wasmCloud/crates/providers/target/debug/httpserver.par.gz" link_name="default"
2024-02-12T22:28:23.960374Z  INFO wasmcloud_provider_sdk::provider_main: Starting capability provider VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5 instance 018d9f6f-8b0b-20c5-efc1-dca0456a2ac1 with nats url nats://127.0.0.1:4222
2024-02-12T22:28:23.962546Z  INFO wasmcloud_provider_sdk: nats client connected
2024-02-12T22:28:23.962974Z  INFO wasmcloud_provider_httpserver: httpserver starting listener for actor addr=0.0.0.0:8080 actor_id=MBLXMMR4HJK6IC4N5PCR5SZ233L74UKENCZX33Y2CZGMHUHJHZKUBCES
2024-02-12T22:28:23.963203Z DEBUG wasmcloud_provider_sdk::provider: subscribing for link del topic=wasmbus.rpc.default.VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5.default.linkdefs.del
2024-02-12T22:28:23.963233Z DEBUG wasmcloud_provider_sdk::provider: subscribing for shutdown : wasmbus.rpc.default.VAQ44JZI5TVX4LBBDOP3PCGTG7VW4DLJYWKCY5SA36UGTFKHHGNYS2Q5.default.shutdown

@connorsmith256 connorsmith256 added the do-not-merge PR is not ready to be merged label Feb 12, 2024
@connorsmith256 connorsmith256 requested a review from a team as a code owner February 12, 2024 22:31
Copy link
Contributor

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to go I think now that 0.82 is out. cc @brooksmtownsend before we start merging anything

Signed-off-by: Connor Smith <connor.smith.256@gmail.com>
@brooksmtownsend
Copy link
Member

Rebasing this to fix the audit issue

@brooksmtownsend brooksmtownsend enabled auto-merge (rebase) February 15, 2024 16:21
@brooksmtownsend brooksmtownsend merged commit 637810b into wasmCloud:main Feb 15, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PR is not ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] provider debug messages not getting through to host
3 participants