Project

sysloggly

0.0
No commit activity in last 3 years
No release in over 3 years
Lograge and Syslog integration for Rails apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Sysloggly

Provides a very opinionated Lograge and Syslog integration for Rails apps.

Installation

Include sysloggly in your Gemfile.

gem 'sysloggly'

Configuration

Sysloggly.configure do |config|
  config.env = Rails.env         # default

  # for filelog                  # default
  config.uri = "file://#{Rails.root.join('log','sysloggly.log')}"

  # for syslog '[udp|tcp]://<hostname>:<port>/<facility>'
  config.uri = "udp://127.0.0.1:514/23"

  config.ignore_user_agents = ["Pingdom.com_bot"] # default
end

Usage

In most cases you have to do nothing else. However you can use Sysloggly.logger to log output JSON directly to syslog.

Sysloggly.logger.info({ foo: 'foo', bar: 'bar'})

Thanks

Greatly inspired by the logglier gem. And thanks to lograge, one of the most helpful Rails gems out there.