Skip to content

Instantly share code, notes, and snippets.

@nicholaides
Created February 21, 2014 18:51
Show Gist options
  • Save nicholaides/9140729 to your computer and use it in GitHub Desktop.
Save nicholaides/9140729 to your computer and use it in GitHub Desktop.
Decode GELF data
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