Skip to content

Enable filter in log4j ApplicationInsightsAppender #348

@tobiasdiez

Description

@tobiasdiez

The configuration

<ApplicationInsightsAppender name="applicationInsightsAppender">
   <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY" />
</ApplicationInsightsAppender>

results in the error

appender ApplicationInsightsAppender has no parameter that matches element ThresholdFilter.


I think, as a fix the appender needs to add a builder

@PluginBuilderFactory
public static <B extends Builder<B>> B newBuilder() {
    return new Builder<B>().asBuilder();
}
́public static class Builder<B extends Builder<B>> extends AbstractAppender.Builder<B>
            implements org.apache.logging.log4j.core.util.Builder<ApplicationInsightsAppender> { ... }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions