Resource
endpoint
A logging endpoint.
resource endpoint;F write
write: func(msg: list<u8>);Writes a data to the given endpoint.
Each call to write with a non-empty message produces a single log event.
F open
open: func(name: string) -> result<endpoint, open-error>;Tries to get an endpoint by name.
Currently, the conditions on an endpoint name are:
- It must not be empty.
- It must not contain newlines (
\n) or colons (:). - It must not be
stdoutorstderr, which are reserved for debugging.
Names are case sensitive. Calling get-endpoint with a name that doesn't correspond to any
logging endpoint available in your service will still return a usable endpoint, and writes
to that endpoint will succeed. Refer to your service dashboard to diagnose missing log
events.