0.01
No commit activity in last 3 years
No release in over 3 years
Writes to syslog with user defined params
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0
~> 0.12
~> 0.8

Runtime

 Project Readme

Sysloggable

Write your logs to syslog. Message is formatted with options and duration.

Installation

Add this line to your application's Gemfile:

gem 'sysloggable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sysloggable

Usage

class FooService
  include ::Sysloggable::InjectLogger(ident: 'banners_stats')

  def call
    message = "Heavy operation"
    logger.info(message, operation: 'dump', counter: counter.id, date: date) do |params|
      heavy_process!
    end
  rescue exception
    logger.fatal(exception.message, trace: exception.backtrace.join("\n"))
    raise
  end
end

Development

Install Docker, Docker-Compose and DIP https://github.com/bibendi/dip

dip provision

dip rspec