You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "none (JIRA)" <ji...@apache.org> on 2017/12/13 17:54:00 UTC

[jira] [Created] (LOG4J2-2150) Using newBuilder with RollingFileAppender fails with some of the calls

none created LOG4J2-2150:
----------------------------

             Summary: Using newBuilder with RollingFileAppender fails with some of the calls
                 Key: LOG4J2-2150
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2150
             Project: Log4j 2
          Issue Type: Bug
    Affects Versions: 2.10.0, 2.9.0
            Reporter: none


Hi, when i try do to

    Appender dst =
      RollingFileAppender.newBuilder()
          .withAdvertise(false)
          .withAdvertiseUri(null)
          .withAppend(true)
          .withBufferedIo(false)
          .withBufferSize(8192)
          .setConfiguration(config)
          .withFileName(resolve(logdir).resolve(name).toString())
          .withFilePattern(resolve(logdir).resolve(name).toString() + ".%d{yyyy-MM-dd}.gz")
          .withFilter(null)
          .withIgnoreExceptions(true)
          .withImmediateFlush(true)
          .withLayout(layout)
          .withCreateOnDemand(false)
          .withLocking(false)
          .withName(name)
          .withPolicy(policy)
          .withStrategy(DefaultRolloverStrategy.createStrategy(
                "7",
                "1",
                "max",
                String.valueOf(Deflater.DEFAULT_COMPRESSION),
                null,
                false,
                new NullConfiguration()))
          .build();

it is failing with

java/com/google/gerrit/server/util/SystemLog.java:140: error: cannot find symbol
          .withPolicy(policy)
          ^
  symbol:   method withPolicy(CronTriggeringPolicy)
  location: class Builder
Target //:release failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 56.909s, Critical Path: 47.15s
FAILED: Build did NOT complete successfully




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)