#wasmcloud #wasm #logging #webassembly #capability

wasmcloud-interface-logging

interface for logging capability provider (wasmcloud:builtin:logging)

15 releases (7 breaking)

0.8.1 Nov 23, 2022
0.7.1 Oct 9, 2022
0.6.1 Jul 18, 2022
0.5.0 Mar 1, 2022
0.2.0 Oct 24, 2021

#250 in WebAssembly

Download history 43/week @ 2022-12-02 22/week @ 2022-12-09 48/week @ 2022-12-16 53/week @ 2022-12-23 31/week @ 2022-12-30 70/week @ 2023-01-06 31/week @ 2023-01-13 64/week @ 2023-01-20 90/week @ 2023-01-27 112/week @ 2023-02-03 87/week @ 2023-02-10 84/week @ 2023-02-17 94/week @ 2023-02-24 31/week @ 2023-03-03 79/week @ 2023-03-10 171/week @ 2023-03-17

377 downloads per month

Apache-2.0 and maybe LGPL-3.0-or-later

14KB
242 lines

crates.io  TinyGo Version

wasmCloud Builtin Logging Interface

This interface defines the wasmCloud built-in logging interface that comes with each of our supported host runtimes. Actors that use this interface must have the capability contract wasmcloud:builtin:logging in their claims list (wash claims sign --logging).

Capability Provider Implementations

There are no external implementations for this provider as they are built directly into the host runtime.

Example Usage (🦀 Rust)

Logging at all available levels:

use wasmbus_rpc::actor::prelude::RpcResult;
use wasmcloud_interface_logging::{debug, error, info, warn};

// Note: The function you're logging in _must_ be async. This is due to the
// way our logging macros work and is a known limitation of actor logging
async fn log_to_all() -> RpcResult<()> {
    debug!("Watch out for moths");
    info!("This is an info level log!");
    warn!("Some viewers may find the following log disturbing");
    error!("I can't let you do that, Dave");

    Ok(())
}

Dependencies

~9–20MB
~409K SLoC