Skip to main content
Log levels indicate the severity of an event. Timberlogs supports four levels, ordered from least to most severe:
debug < info < warn < error

Severity Hierarchy

LevelPurposeExample
debugDetailed diagnostic information for development and troubleshootingSQL queries, cache lookups, internal state
infoNormal operational events and business milestonesUser sign-ins, orders placed, jobs completed
warnPotential issues that don’t block execution but need attentionRate limits approaching, deprecated API usage, retry attempts
errorFailures that require immediate investigationDatabase connection failures, payment processing errors, unhandled exceptions

When to Use Each Level

debug

Use for information only needed during active debugging. These logs are typically high-volume and disabled in production:
  • Database query details and timing
  • Cache hit/miss events
  • Internal function entry/exit
  • Configuration values at startup

info

Use for events that confirm the system is working correctly. These form the baseline of operational visibility:
  • User actions (sign-in, sign-out, purchase)
  • Job or request completion
  • Service startup and shutdown
  • Scheduled task execution

warn

Use when something unexpected happens but the system can continue. Warnings often indicate future problems:
  • Rate limits nearing capacity
  • Fallback behavior triggered
  • Deprecated feature usage
  • Slow operations exceeding thresholds

error

Use for failures that need attention. Errors mean something went wrong and likely needs a fix:
  • Unhandled exceptions
  • External service failures
  • Data validation errors in critical paths
  • Resource exhaustion (disk, memory, connections)

Level Filtering

You can set a minimum log level to control which logs are sent. When minLevel is set, only logs at that level or higher are transmitted:
minLevelSends
debugdebug, info, warn, error
infoinfo, warn, error
warnwarn, error
errorerror only
This is useful for reducing noise in production while keeping full verbosity in development.

Dashboard Colors

In the Timberlogs dashboard, each level is color-coded for quick visual scanning:
LevelColor
debugGray
infoBlue
warnYellow
errorRed

Further Reading