protected LoghubAppender()

in src/main/java/com/aliyun/openservices/log/log4j2/LoghubAppender.java [69:128]


    protected LoghubAppender(String name,
                             Filter filter,
                             Layout<? extends Serializable> layout,
                             boolean ignoreExceptions,
                             String project,
                             String logStore,
                             String endpoint,
                             String accessKeyId,
                             String accessKeySecret,
                             String stsToken,
                             int totalSizeInBytes,
                             int maxBlockMs,
                             int ioThreadCount,
                             int batchSizeThresholdInBytes,
                             int batchCountThreshold,
                             int lingerMs,
                             int retries,
                             int baseRetryBackoffMs,
                             int maxRetryBackoffMs,
                             String topic,
                             String source,
                             DateTimeFormatter formatter,
                             String mdcFields,
                             TimePrecision timePrecision
    ) {
        super(name, filter, layout, ignoreExceptions);
        this.project = project;
        this.endpoint = endpoint;
        this.accessKeySecret = accessKeySecret;
        this.accessKeyId = accessKeyId;
        this.stsToken = stsToken;
        this.logStore = logStore;

        this.totalSizeInBytes = totalSizeInBytes;
        this.retries = retries;
        this.ioThreadCount = ioThreadCount;
        this.maxBlockMs = maxBlockMs;
        this.batchCountThreshold = batchCountThreshold;
        this.batchSizeThresholdInBytes = batchSizeThresholdInBytes;
        this.lingerMs = lingerMs;
        this.baseRetryBackoffMs = baseRetryBackoffMs;
        this.maxRetryBackoffMs = maxRetryBackoffMs;
        if (topic == null) {
            this.topic = "";
        } else {
            this.topic = topic;
        }
        this.source = source;
        this.formatter = formatter;
        this.mdcFields = mdcFields;
        this.timePrecision = timePrecision;

        // set nano clock if timePrecision is NANO
        if (TimePrecision.NANO.equals(this.timePrecision)) {
            NanoClock current = Log4jLogEvent.getNanoClock();
            if (current instanceof DummyNanoClock) {
                Log4jLogEvent.setNanoClock(new SystemNanoClock());
            }
        }
    }