Skip to content

Commit

Permalink
fix: set log level correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Sep 25, 2024
1 parent c1eb1fc commit c5fbfe4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion call.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func runCall(cmd *cobra.Command, call *callArgs) error {
manifest.Memory.MaxVarBytes = int64(call.memoryVarMaxBytes)
}

var logLevel extism.LogLevel = extism.LogLevelOff
var logLevel extism.LogLevel = extism.LogLevelError
switch call.logLevel {
case "info":
logLevel = extism.LogLevelInfo
Expand All @@ -230,6 +230,8 @@ func runCall(cmd *cobra.Command, call *callArgs) error {
logLevel = extism.LogLevelTrace
}

extism.SetLogLevel(logLevel)

pluginConfig := extism.PluginConfig{
ModuleConfig: wazero.NewModuleConfig().WithSysWalltime(),
RuntimeConfig: wazero.NewRuntimeConfig().WithCloseOnContextDone(call.timeout > 0),
Expand Down

0 comments on commit c5fbfe4

Please sign in to comment.