Skip to content

feat: make get_log_level available to plugin, respect log level#85

Merged
nilslice merged 1 commit intomainfrom
log-level-status
Sep 27, 2024
Merged

feat: make get_log_level available to plugin, respect log level#85
nilslice merged 1 commit intomainfrom
log-level-status

Conversation

@nilslice
Copy link
Copy Markdown
Member

The JS SDK variant of the changes here:

This is working in Deno, but not Node.. expected output is:

deno run -A examples/deno.ts ../go-sdk/wasm/log.wasm
calling {
  filename: "../go-sdk/wasm/log.wasm",
  funcname: "run_test",
  input: "this is a test"
}
Trace: this is a trace log
    at log_trace (file:///Users/steve/Projects/extism/js-sdk/src/call-context.ts:500:20)
    at github.com/extism/go-pdk.Log (wasm://wasm/000d0dde:1:14662)
    at run_test (wasm://wasm/000d0dde:1:15060)
    at ForegroundPlugin.callBlock (file:///Users/steve/Projects/extism/js-sdk/src/foreground-plugin.ts:76:7)
    at ForegroundPlugin.call (file:///Users/steve/Projects/extism/js-sdk/src/foreground-plugin.ts:96:46)
    at file:///Users/steve/Projects/extism/js-sdk/examples/deno.ts:19:26
    at eventLoopTick (ext:core/01_core.js:168:7)
this is a debug log
this is an info log
this is a warning log
this is an error log

@nilslice
Copy link
Copy Markdown
Member Author

I think @chrisdickinson has and open PR targeting this branch. Let's merge that if CI is ready, and then this can be reviewed.

@nilslice
Copy link
Copy Markdown
Member Author

@chrisdickinson - I am not confident about the conflicts here... if you get a moment to take a look, it would be much appreciated!

@chrisdickinson
Copy link
Copy Markdown
Contributor

I'll take over the PR for a bit and take a look!

@chrisdickinson chrisdickinson force-pushed the log-level-status branch 2 times, most recently from 0e44e25 to b3e7715 Compare September 23, 2024 19:14
@nilslice nilslice merged commit 245daa1 into main Sep 27, 2024
@nilslice nilslice deleted the log-level-status branch September 27, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants