Mellow LogoMellow

Debugging

Diagnosing a running Mellow instance.

Debugging

Logs

  • Set LOG_LEVEL=debug for verbose structured logs (slog).
  • Set LOG_CHANNEL_ID to mirror gateway connect/disconnect, guild join/leave, and startup events into a Discord channel.
  • /tools logs (owner-only) shows recent SystemLog rows, filterable by type.

Owner commands

  • /debug database - is the database reachable, and what do the counts look like.
  • /debug ai - is the Anthropic key valid and the AI enabled.
  • /debug version - what build is running.
  • /tools status - uptime, shard count, memory.

Common checks

SymptomLook at
Commands missingGlobal propagation can take up to an hour; owner commands only in PRIVATE_GUILD_ID; try MELLOW_FORCE_DEPLOY=1.
No AI replies, only fixed textANTHROPIC_API_KEY, and /mellow view for enabled.
Startup exits on migrateDATABASE_URL, database exists, role can run DDL. Try MELLOW_MIGRATE_ONLY=1.
"content could not be decrypted"ENCRYPTION_KEY or ENCRYPTION_SALT_LIST changed; restore the old salt.
Shards reconnectingNetwork to Discord; shard close events log the reason.
API 401POST endpoints need Authorization: Bearer <API_TOKEN>.

Local development

make pg-up          # throwaway Postgres in Docker
cp .env.example .env
make run            # go run ./cmd/mellow
make test           # go test ./...
make vet            # go vet ./...

make migrate-up / migrate-down use the migrate CLI against DATABASE_URL for iterating on migrations; the binary also applies them on startup.

Reporting a bug

Open an issue at github.com/CodeMeAPixel/Mellow/issues with the version (/version), what you did, and what happened. For security issues, email [email protected] instead.

On this page