Project

semlogr

0.0
No commit activity in last 3 years
No release in over 3 years
A modern semantic logger for Ruby inspired by Serilog.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 0.11
~> 12.3
~> 3.7
= 0.53
~> 0.15
~> 0.9

Runtime

~> 1.1
~> 3.5
 Project Readme

Codeship Status for semlogr/semlogr Maintainability Test Coverage

Semlogr

Semlogr is a semantic logger for Ruby inspired by the awesome semantic logger for .NET Serilog.

Installation

To install:

gem install semlogr

Or if using bundler, add semlogr to your Gemfile:

gem 'semlogr'

then:

bundle install

Getting Started

Create an instance of the logger configuring one or more sinks.

require 'semlogr'

Semlogr.logger = Semlogr.create_logger do |c|
  c.log_at :info

  c.write_to :colored_console
end

Semlogr.info('Customer {customer_id} did something interesting', customer_id: 1234)

More configuration examples can be found inside the samples directory.

Development

After cloning the repository run bundle install to get up and running, to run the specs just run bundle exec rake. You can also experiment in an interactive pry console using bin/console.

Contributing

See anything broken or something you would like to improve? feel free to submit an issue or better yet a pull request!