@synonymdev/pubky
    Preparing search index...

    Function setLogLevel

    • Set the global logging verbosity for the WASM Pubky SDK. Routes Rust log output to the browser console.

      Accepted values (case-sensitive): "error" | "warn" | "info" | "debug" | "trace". Effects:

      • Initializes the logger once; subsequent calls may throw if the logger is already set.
      • Emits a single info log: Log level set to: <level>.
      • Messages at or above level are forwarded to the appropriate console.* method.

      Parameters

      • level: Level

        Minimum log level to enable. One of: "error" | "warn" | "info" | "debug" | "trace".

      Returns void

      If level is invalid ("Invalid log level") or the logger cannot be initialized (e.g., already initialized).

      Usage: Call once at application startup, before invoking other SDK APIs.