Class: Timber::Logger

Inherits:
Logger
  • Object
show all
Includes:
ActiveSupport::LoggerThreadSafeLevel, LoggerSilence
Defined in:
lib/timber-rails/logger.rb

Overview

The Timber Logger behaves exactly like the standard Ruby ‘::Logger`, except that it supports a transparent API for logging structured data and events.

Examples:

Basic logging

logger.info "Payment rejected for customer #{customer_id}"

Logging an event

logger.info "Payment rejected", payment_rejected: {customer_id: customer_id, amount: 100}