Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions proxywasm/hostcall.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,11 @@ func LogCritical(msg string) {
internal.ProxyLog(internal.LogLevelCritical, internal.StringBytePtr(msg), len(msg))
}

// LogTracef emits a message as a log with Critical log level.
func LogDestination(dest string, msg string) {
internal.ProxyLogDestination(internal.StringBytePtr(dest), len(dest), internal.LogLevelInfo, internal.StringBytePtr(msg), len(msg))
}

// LogCriticalf formats according to a format specifier and emits as a log with Critical log level.
//
// Note that not all combinations of format and args are supported by tinygo.
Expand Down
3 changes: 3 additions & 0 deletions proxywasm/internal/abi_hostcalls.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ package internal
//export proxy_log
func ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status

//export proxy_log_destination
func ProxyLogDestination(destination *byte, destinationSize int, logLevel LogLevel, messageData *byte, messageSize int) Status

//export proxy_send_local_response
func ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int,
bodyData *byte, bodySize int, headersData *byte, headersSize int, grpcStatus int32) Status
Expand Down