Sha256: 9bf3a28c18761a5ee64118d4d59ac654c004bf115be8ed6304ab001d144f1fe6
Contents?: true
Size: 447 Bytes
Versions: 139
Compression:
Stored size: 447 Bytes
Contents
require 'base64' require 'json' require 'stringio' require 'zlib' module Jets::Job::Helpers module LogEventHelper def log_event encoded = event["awslogs"]["data"] compressed_string = Base64.decode64(encoded) gz = Zlib::GzipReader.new(StringIO.new(compressed_string)) uncompressed_string = gz.read data = JSON.load(uncompressed_string) ActiveSupport::HashWithIndifferentAccess.new(data) end end end
Version data entries
139 entries across 139 versions & 3 rubygems