Created
February 21, 2014 18:51
-
-
Save nicholaides/9140729 to your computer and use it in GitHub Desktop.
Decode GELF data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def decode(data) | |
JSON.parse(Zlib::Inflate.inflate(data.join.each_byte.to_a.pack('C*'))) | |
end | |
# usage: decode(APP_LOGGER.notify(some_data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment