class ParserProcessor
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Logs.ParserProcessor | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#ParserProcessor | 
|  Java | software.amazon.awscdk.services.logs.ParserProcessor | 
|  Python | aws_cdk.aws_logs.ParserProcessor | 
|  TypeScript (source) | aws-cdk-lib»aws_logs»ParserProcessor | 
Implements
IProcessor
Parser processor for common data formats.
Example
// Create a log group
const logGroup = new logs.LogGroup(this, 'MyLogGroup');
// Create a JSON parser processor
const jsonParser = new logs.ParserProcessor({
  type: logs.ParserProcessorType.JSON
});
// Create a processor to add keys
const addKeysProcessor = new logs.JsonMutatorProcessor({
  type: logs.JsonMutatorType.ADD_KEYS,
  addKeysOptions: {
    entries: [{
      key: 'metadata.transformed_in',
      value: 'CloudWatchLogs'
    }]
  }
});
// Create a transformer with these processors
new logs.Transformer(this, 'Transformer', {
  transformerName: 'MyTransformer',
  logGroup: logGroup,
  transformerConfig: [jsonParser, addKeysProcessor]
});
Initializer
new ParserProcessor(props: ParserProcessorProps)
Parameters
- props ParserProcessor Props 
Creates a new parser processor.
Properties
| Name | Type | Description | 
|---|---|---|
| type | Parser | The type of parser. | 
type
Type:
Parser
The type of parser.
