TwP / logging

A flexible logging library for use in Ruby programs based on the design of Java's log4j library.
https://rubygems.org/gems/logging
MIT License
529 stars 100 forks source link

Enable JSON formatting of objects #34

Closed TwP closed 12 years ago

TwP commented 12 years ago

Currently when an object, anything other than a String, is passed to a log method the object will be converted to a String in one of three ways:

For some logging destinations, it would be really nice to be able to generate a JSON representation of the object provided it is a Hash of key / value pairs or an Array of [key, value] pairs. This type of output would work nicely with MongoDB logging and with the Parseable JSON formatter.

copiousfreetime commented 12 years ago

Along these lines, you may want to consider a GELF appender/formatter

TwP commented 12 years ago

Logging now supports JSON encoded messages.