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 RpcResult;
use ;
// 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
🐭 Golang
import (
"github.com/wasmcloud/actor-tinygo"
httpserver "github.com/wasmcloud/interfaces/httpserver/tinygo"
logging "github.com/wasmcloud/interfaces/logging/tinygo"
)
type Actor struct
func main()
func (ctx *actor.Context, req httpserver.HttpRequest) (*httpserver.HttpResponse, error)