class Amazonite::CloudWatchLogs::ParseJSON

Overview

This processor parses log events that are in JSON format. It can extract JSON key-value pairs and place them under a destination that you specify.

Additionally, because you must have at least one parse-type processor in a transformer, you can use ParseJSON as that processor for JSON-format logs, so that you can also apply other processors, such as mutate processors, to these logs.

For more information about this processor including examples, see parseJSON in the CloudWatch Logs User Guide.

Included Modules

Defined in:

cloudwatch_logs/parse_json.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(source : String | Nil = nil, destination : String | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def destination : String | Nil #

The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node.


[View source]
def destination=(destination : String | Nil) #

The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def source : String | Nil #

Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book


[View source]
def source=(source : String | Nil) #

Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book


[View source]
def validate! : Nil #

[View source]