0.01
No commit activity in last 3 years
No release in over 3 years
Add current thread's fingerprint to all your logs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

threaded_logging ยท Gem Version Build Status Coverage Status

This gem patches default Ruby log formatter so that every line includes a digest of current process PID + current thread id so that you can easily grep the logs of every particular thread. It also adds the metadata part to each line of the message in case it is multiline.

Installation

gem 'threaded_logging'
$ bundle install
# --- or ---
$ gem install 'threaded_logging'
require 'threaded_logging'

Usage

Before:

> Logger.new(STDOUT).info("Line 1\nLine 2")
I, [2016-05-23T22:33:40.649346 #13604]  INFO -- : Line 1
Line 2

After:

> Logger.new(STDOUT).info("Line 1\nLine 2")
I [2016-05-23T22:32:30.483767] #bd134bb0: Line 1
I [2016-05-23T22:32:30.483767] #bd134bb0: Line 2

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/umbrellio/table_sync.

License

Released under MIT License.

Authors

Created by Yuri Smirnov.

Supported by Umbrellio