Jido.Debug (Jido v2.0.0)

View Source

Per-instance debug mode for Jido agents.

Provides a single entrypoint to control observability verbosity at runtime, scoped to a specific Jido instance.

Debug Levels

  • :off - No debug overrides, uses configured defaults
  • :on - Developer-friendly verbosity (debug logging, keys_only args, minimal debug events)
  • :verbose - Maximum detail (trace logging, full args, all debug events)

Usage

# Via instance module
MyApp.Jido.debug(:on)
MyApp.Jido.debug(:verbose)
MyApp.Jido.debug(:off)
MyApp.Jido.debug()          # => :off

# Via top-level Jido module (applies to Jido.Default)
Jido.debug(:on)

Summary

Types

instance()

@type instance() :: atom()

level()

@type level() :: :off | :on | :verbose

Functions

disable(instance)

@spec disable(instance()) :: :ok

enable(instance, level \\ :on, opts \\ [])

@spec enable(instance(), level(), keyword()) :: :ok

enabled?(instance)

@spec enabled?(instance()) :: boolean()

level(instance)

@spec level(instance()) :: level()

maybe_enable_from_config(otp_app, instance)

@spec maybe_enable_from_config(atom(), instance()) :: :ok

override(instance, key)

@spec override(instance(), atom()) :: term() | nil

reset(instance)

@spec reset(instance()) :: :ok

status(instance)

@spec status(instance()) :: map()