Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
 
 

Repository files navigation

Watchdog

Rails default logging is not great outside of the development loop. It is noisy and its formatting makes parsing a challenge in log management solutions. Watchdog aims to standardise and simplify the logging format for Rails by both reducing its default output and providing formatters for popular log management solutions.

Installation

Add this line to your application's Gemfile:

gem 'watchdog-rails', require: 'watchdog', git: 'https://github.com/Supy/watchdog.git', ref: '58ddfef'

Set the required log formatter in either config/environments/production.rb or config/application.rb:

# For easy to read key-value pairs
config.watchdog.log_formatter = :simple

# For Datadog's JSON format
config.watchdog.log_formatter = :datadog

# For disabling ActionController params logging 
config.watchdog.include_request_params = false # (defaults true)

Credits

This gem was heavily inspired by and draws from the lograge gem.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages