org.apache.logging.log4j.core.appender.rewrite.RewritePolicy Java Examples

The following examples show how to use org.apache.logging.log4j.core.appender.rewrite.RewritePolicy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RoutingAppender.java    From logging-log4j2 with Apache License 2.0 6 votes vote down vote up
private RoutingAppender(final String name, final Filter filter, final boolean ignoreExceptions, final Routes routes,
        final RewritePolicy rewritePolicy, final Configuration configuration, final PurgePolicy purgePolicy,
        final AbstractScript defaultRouteScript, Property[] properties, final Boolean requiresLocation) {
    super(name, filter, null, ignoreExceptions, properties);
    this.routes = routes;
    this.configuration = configuration;
    this.rewritePolicy = rewritePolicy;
    this.purgePolicy = purgePolicy;
    this.requiresLocation = requiresLocation;
    if (this.purgePolicy != null) {
        this.purgePolicy.initialize(this);
    }
    this.defaultRouteScript = defaultRouteScript;
    Route defRoute = null;
    for (final Route route : routes.getRoutes()) {
        if (route.getKey() == null) {
            if (defRoute == null) {
                defRoute = route;
            } else {
                error("Multiple default routes. Route " + route.toString() + " will be ignored");
            }
        }
    }
    defaultRoute = defRoute;
}
 
Example #2
Source File: TestFileRewriteAuditAppender.java    From syncope with Apache License 2.0 4 votes vote down vote up
@Override
protected RewritePolicy getRewritePolicy() {
    return TestRewritePolicy.createPolicy();
}
 
Example #3
Source File: DefaultRewriteAuditAppender.java    From syncope with Apache License 2.0 4 votes vote down vote up
protected RewritePolicy getRewritePolicy() {
    return PassThroughAuditRewritePolicy.createPolicy();
}
 
Example #4
Source File: RoutingAppender.java    From logging-log4j2 with Apache License 2.0 4 votes vote down vote up
public RewritePolicy getRewritePolicy() {
    return rewritePolicy;
}
 
Example #5
Source File: RoutingAppender.java    From logging-log4j2 with Apache License 2.0 4 votes vote down vote up
public B setRewritePolicy(@SuppressWarnings("hiding") final RewritePolicy rewritePolicy) {
    this.rewritePolicy = rewritePolicy;
    return asBuilder();
}
 
Example #6
Source File: RoutingAppender.java    From logging-log4j2 with Apache License 2.0 4 votes vote down vote up
public RewritePolicy getRewritePolicy() {
    return rewritePolicy;
}