Skip to content

Simple utilization of syslogger and lograge to tame ruby log output.

License

Notifications You must be signed in to change notification settings

jdahlke/sysloggly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple utilization of syslogger and lograge to tame ruby log output.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages