wasm-nats-stream-client/wit/deps/wasi-logging-0.1.0-draft/package.wit

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-12-05 23:30:02 +00:00
package wasi:logging@0.1.0-draft;
2024-12-06 11:55:15 +00:00
/// WASI Logging is a logging API intended to let users emit log messages with
/// simple priority levels and context values.
2024-12-05 23:30:02 +00:00
interface logging {
2024-12-06 11:55:15 +00:00
/// A log level, describing a kind of message.
2024-12-05 23:30:02 +00:00
enum level {
2024-12-06 11:55:15 +00:00
/// Describes messages about the values of variables and the flow of
/// control within a program.
2024-12-05 23:30:02 +00:00
trace,
2024-12-06 11:55:15 +00:00
/// Describes messages likely to be of interest to someone debugging a
/// program.
2024-12-05 23:30:02 +00:00
debug,
2024-12-06 11:55:15 +00:00
/// Describes messages likely to be of interest to someone monitoring a
/// program.
2024-12-05 23:30:02 +00:00
info,
2024-12-06 11:55:15 +00:00
/// Describes messages indicating hazardous situations.
2024-12-05 23:30:02 +00:00
warn,
2024-12-06 11:55:15 +00:00
/// Describes messages indicating serious errors.
2024-12-05 23:30:02 +00:00
error,
2024-12-06 11:55:15 +00:00
/// Describes messages indicating fatal errors.
2024-12-05 23:30:02 +00:00
critical,
}
2024-12-06 11:55:15 +00:00
/// Emit a log message.
///
/// A log message has a `level` describing what kind of message is being
/// sent, a context, which is an uninterpreted string meant to help
/// consumers group similar messages, and a string containing the message
/// text.
2024-12-05 23:30:02 +00:00
log: func(level: level, context: string, message: string);
}
2024-12-06 11:55:15 +00:00
world imports {
import logging;
}