aws-cloudtrail-processing-library icon indicating copy to clipboard operation
aws-cloudtrail-processing-library copied to clipboard

DefaultEventsProcessor is always added with no way to remove

Open kzgrey opened this issue 6 years ago • 1 comments

The following line block of code will result in aws-cloudtrail-processing-library spamming the log output with event names every time an event is processed:

Builder factory = new Builder(this, configuration_).withExceptionHandler(this); cloudTrailExecutor_ = factory.build();

I believe the root cause is that the DefaultEventsProcessor is always registered for callbacks irrespective of whether or not an EventProcessor is defined.

https://github.com/aws/aws-cloudtrail-processing-library/blob/master/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/impl/DefaultEventsProcessor.java#L34

kzgrey avatar Apr 19 '19 19:04 kzgrey

kzgrey, the default EventProcessor is registered when no custom EventProcessor is provided. To get rid of the logging in the DefaultEventProcessor you can create a custom no-op EventProcessor, and add it to the Builder.

simongjh avatar Sep 13 '20 03:09 simongjh