Skip to content

Commit

Permalink
chore: remove LogTrace as it is not exposed by the CLI and adjust the…
Browse files Browse the repository at this point in the history
… README.md, accordingly (#38)

Co-authored-by: [email protected] <[email protected]>
  • Loading branch information
hilaryRope and [email protected] authored Jul 13, 2024
1 parent de6b7b8 commit 855c34f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,20 @@ Extism provides a simple [logging function](https://pkg.go.dev/github.com/extism
func logStuff() int32 {
pdk.Log(pdk.LogInfo, "An info log!")
pdk.Log(pdk.LogDebug, "A debug log!")
pdk.Log(pdk.LogWarn, "A trace log!")
pdk.Log(pdk.LogWarn, "A warn log!")
pdk.Log(pdk.LogError, "An error log!")
pdk.Log(pdk.LogTrace, "A trace log!")
return 0
}
```

From [Extism CLI](https://github.com/extism/cli):

```bash
extism call plugin.wasm log_stuff --wasi --log-level=trace
extism call plugin.wasm log_stuff --wasi --log-level=debug
2023/10/12 12:11:23 Calling function : log_stuff
2023/10/12 12:11:23 An info log!
2023/10/12 12:11:23 A debug log!
2023/10/12 12:11:23 A trace log!
2023/10/12 12:11:23 A warn log!
2023/10/12 12:11:23 An error log!
```

Expand Down
1 change: 0 additions & 1 deletion extism_pdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const (
LogDebug
LogWarn
LogError
LogTrace
)

func load(offset extismPointer, buf []byte) {
Expand Down

0 comments on commit 855c34f

Please sign in to comment.