Semlogr logging sink for sending log events to Seq
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
build
lib/semlogr/sinks
spec
.codeclimate.yml
.gitignore
.rspec
.rubocop.yml
CHANGELOG.md
Gemfile
LICENSE.md
README.md
Rakefile
codeship-env.encrypted
codeship-services.yml
codeship-steps.yml
semlogr-sinks-seq.gemspec

README.md

Codeship Status for semlogr/semlogr-sinks-seq Maintainability Test Coverage

Seq sink for Semlogr

This sink provides support for writing logs to seq, the sink uses ruby-stud to provide batch flushing of events using the Seq HTTP API.

Installation

To install:

gem install semlogr-sinks-seq

Or if using bundler, add semlogr to your Gemfile:

gem 'semlogr-sinks-seq'

then:

bundle install

Getting Started

Create an instance of the logger configuring the seq sink with your token.

require 'semlogr'
require 'semlogr/sinks/seq'

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

  c.write_to :seq, server_url: 'http://seq', api_key: '1234'
end

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

Development

After cloning the repository run bundle install to get up and running, to run the specs just run rake spec.

Contributing

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