Skip to content

Replacement rails logger that allows for context to be attached to messages.

License

Notifications You must be signed in to change notification settings

christopherchiu/contextual_logging

 
 

Repository files navigation

ContextualLogging

Build Status

Usage

Intended use is to wrap an underlying log device which corresponds to the logging subsystem in the given environment. For example, development.rb might have something like this:

config.logger = ContextualLogging::Logger.new(::Logger.new(STDOUT))

or for use in production. Something like this for production.rb

logstash_socket = UDPSocket.new.tap {|s| s.connect(Settings.logstash.host, Settings.logstash.udp_port) }
config.logger = ContextualLogging::Logger.new(::Logger.new(logstash_socket))

This project rocks and uses MIT-LICENSE.

About

Replacement rails logger that allows for context to be attached to messages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 90.2%
  • HTML 6.5%
  • JavaScript 1.8%
  • CSS 1.5%