Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

nilslice
Copy link
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
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
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
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
5 checks passed
@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