Documentation ¶
Overview ¶
Logging: wasmcloud built-in logging capability provider
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingContractId ¶
func LoggingContractId() string
LoggingContractId returns the capability contract id for this interface
func LoggingHandler ¶
func LoggingHandler(actor_ Logging) actor.Handler
LoggingHandler is called by an actor during `main` to generate a dispatch handler The output of this call should be passed into `actor.RegisterHandlers`
Types ¶
type LogEntry ¶
type LogEntry struct { // severity level: debug,info,warn,error Level string // message to log Text string }
func CDecodeLogEntry ¶
CDecodeLogEntry deserializes a LogEntry using cbor
func MDecodeLogEntry ¶
MDecodeLogEntry deserializes a LogEntry using msgpack
type LoggingReceiver ¶
type LoggingReceiver struct{}
LoggingReceiver receives messages defined in the Logging service interface
func (*LoggingReceiver) Dispatch ¶
func (r *LoggingReceiver) Dispatch(ctx *actor.Context, svc interface{}, message *actor.Message) (*actor.Message, error)
type LoggingSender ¶
type LoggingSender struct {
// contains filtered or unexported fields
}
LoggingSender sends messages to a Logging service
func NewProviderLogging ¶
func NewProviderLogging() *LoggingSender
NewProvider constructs a client for sending to a Logging provider implementing the 'wasmcloud:builtin:logging' capability contract, with the "default" link
func NewProviderLoggingLink ¶
func NewProviderLoggingLink(linkName string) *LoggingSender
NewProviderLoggingLink constructs a client for sending to a Logging provider implementing the 'wasmcloud:builtin:logging' capability contract, with the specified link name
func (*LoggingSender) WriteLog ¶
func (s *LoggingSender) WriteLog(ctx *actor.Context, arg LogEntry) error
WriteLog - log a text message