Skip to content

hirocaster/ltsv_ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LtsvNg

LTSV logger for Ruby application.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'ltsv_ng'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ltsv_ng

Usage

for Rails

in config/environment.rb

Rails.application.configure do

(snip)

  logger = LtsvNg::Logger.new(Rails.root.join("log/#{Rails.env}.log"))
  config.logger = logger

(snip)

end

Sample log

Rails.logger.info "foobar" # => level:INFO      time:2015-08-05 12:55:25 +0900  uuid:958125fc-4f35-4f45-9eef-046fece2dfc2       msg:foobar


Rails.logger.info id: 123, name: "alice" # => level:INFO      time:2015-08-05 12:56:03 +0900  uuid:26bd133e-94b2-450d-9ad5-1855c7649ccd       id:123  name:alice

Contributing

  1. Fork it ( https://github.com/hirocaster/ltsv_ng/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

LTSV logger for Ruby application.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages