@Plugin(name="Loghub",
category="Core",
elementType="appender",
printObject=true)
public class LoghubAppender
extends org.apache.logging.log4j.core.appender.AbstractAppender
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
accessKeyId |
protected String |
accessKeySecret |
protected int |
baseRetryBackoffMs |
protected int |
batchCountThreshold |
protected int |
batchSizeThresholdInBytes |
protected String |
endpoint |
protected int |
ioThreadCount |
protected int |
lingerMs |
protected String |
logStore |
protected int |
maxBlockMs |
protected int |
maxRetryBackoffMs |
protected String |
project |
protected int |
retries |
protected String |
stsToken |
protected int |
totalSizeInBytes |
| 限定符 | 构造器和说明 |
|---|---|
protected |
LoghubAppender(String name,
org.apache.logging.log4j.core.Filter filter,
org.apache.logging.log4j.core.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,
org.joda.time.format.DateTimeFormatter formatter,
String mdcFields) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
append(org.apache.logging.log4j.core.LogEvent event) |
static LoghubAppender |
createAppender(String name,
org.apache.logging.log4j.core.Filter filter,
org.apache.logging.log4j.core.Layout<? extends Serializable> layout,
org.apache.logging.log4j.core.config.Configuration config,
String ignore,
String project,
String logStore,
String endpoint,
String accessKeyId,
String accessKeySecret,
String stsToken,
String totalSizeInBytes,
String maxBlockMs,
String ioThreadCount,
String batchSizeThresholdInBytes,
String batchCountThreshold,
String lingerMs,
String retries,
String baseRetryBackoffMs,
String maxRetryBackoffMs,
String topic,
String source,
String timeFormat,
String timeZone,
String mdcFields) |
String |
getAccessKeyId() |
String |
getAccessKeySecret() |
long |
getBaseRetryBackoffMs() |
int |
getBatchCountThreshold() |
int |
getBatchSizeThresholdInBytes() |
String |
getEndpoint() |
int |
getIoThreadCount() |
int |
getLingerMs() |
String |
getLogStore() |
long |
getMaxBlockMs() |
int |
getMaxReservedAttempts() |
long |
getMaxRetryBackoffMs() |
String |
getProject() |
int |
getRetries() |
String |
getSource() |
String |
getTopic() |
int |
getTotalSizeInBytes() |
String |
getUserAgent() |
void |
setAccessKeyId(String accessKeyId) |
void |
setAccessKeySecret(String accessKeySecret) |
void |
setBaseRetryBackoffMs(long baseRetryBackoffMs) |
void |
setBatchCountThreshold(int batchCountThreshold) |
void |
setBatchSizeThresholdInBytes(int batchSizeThresholdInBytes) |
void |
setEndpoint(String endpoint) |
void |
setIoThreadCount(int ioThreadCount) |
void |
setLingerMs(int lingerMs) |
void |
setLogStore(String logStore) |
void |
setMaxBlockMs(long maxBlockMs) |
void |
setMaxReservedAttempts(int maxReservedAttempts) |
void |
setMaxRetryBackoffMs(long maxRetryBackoffMs) |
void |
setMdcFields(String mdcFields) |
void |
setProject(String project) |
void |
setRetries(int retries) |
void |
setSource(String source) |
void |
setTopic(String topic) |
void |
setTotalSizeInBytes(int totalSizeInBytes) |
void |
setUserAgent(String userAgent) |
void |
start() |
void |
stop() |
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toStringaddFilter, getFilter, hasFilter, isFiltered, removeFiltergetState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStoppingprotected String project
protected String logStore
protected String endpoint
protected String accessKeyId
protected String accessKeySecret
protected String stsToken
protected int totalSizeInBytes
protected int maxBlockMs
protected int ioThreadCount
protected int batchSizeThresholdInBytes
protected int batchCountThreshold
protected int lingerMs
protected int retries
protected int baseRetryBackoffMs
protected int maxRetryBackoffMs
protected LoghubAppender(String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.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, org.joda.time.format.DateTimeFormatter formatter, String mdcFields)
public void start()
start 在接口中 org.apache.logging.log4j.core.LifeCyclestart 在类中 org.apache.logging.log4j.core.filter.AbstractFilterablepublic void stop()
stop 在接口中 org.apache.logging.log4j.core.LifeCyclestop 在类中 org.apache.logging.log4j.core.filter.AbstractFilterablepublic void append(org.apache.logging.log4j.core.LogEvent event)
@PluginFactory public static LoghubAppender createAppender(@PluginAttribute(value="name") String name, @PluginElement(value="Filter") org.apache.logging.log4j.core.Filter filter, @PluginElement(value="Layout") org.apache.logging.log4j.core.Layout<? extends Serializable> layout, @PluginConfiguration org.apache.logging.log4j.core.config.Configuration config, @PluginAttribute(value="ignoreExceptions") String ignore, @PluginAttribute(value="project") String project, @PluginAttribute(value="logStore") String logStore, @PluginAttribute(value="endpoint") String endpoint, @PluginAttribute(value="accessKeyId") String accessKeyId, @PluginAttribute(value="accessKeySecret") String accessKeySecret, @PluginAttribute(value="stsToken") String stsToken, @PluginAttribute(value="totalSizeInBytes") String totalSizeInBytes, @PluginAttribute(value="maxBlockMs") String maxBlockMs, @PluginAttribute(value="ioThreadCount") String ioThreadCount, @PluginAttribute(value="batchSizeThresholdInBytes") String batchSizeThresholdInBytes, @PluginAttribute(value="batchCountThreshold") String batchCountThreshold, @PluginAttribute(value="lingerMs") String lingerMs, @PluginAttribute(value="retries") String retries, @PluginAttribute(value="baseRetryBackoffMs") String baseRetryBackoffMs, @PluginAttribute(value="maxRetryBackoffMs") String maxRetryBackoffMs, @PluginAttribute(value="topic") String topic, @PluginAttribute(value="source") String source, @PluginAttribute(value="timeFormat") String timeFormat, @PluginAttribute(value="timeZone") String timeZone, @PluginAttribute(value="mdcFields") String mdcFields)
public String getProject()
public void setProject(String project)
public String getEndpoint()
public void setEndpoint(String endpoint)
public String getAccessKeyId()
public void setAccessKeyId(String accessKeyId)
public String getAccessKeySecret()
public void setAccessKeySecret(String accessKeySecret)
public String getUserAgent()
public void setUserAgent(String userAgent)
public String getLogStore()
public void setLogStore(String logStore)
public int getTotalSizeInBytes()
public void setTotalSizeInBytes(int totalSizeInBytes)
public long getMaxBlockMs()
public void setMaxBlockMs(long maxBlockMs)
public int getIoThreadCount()
public void setIoThreadCount(int ioThreadCount)
public int getBatchSizeThresholdInBytes()
public void setBatchSizeThresholdInBytes(int batchSizeThresholdInBytes)
public int getBatchCountThreshold()
public void setBatchCountThreshold(int batchCountThreshold)
public int getLingerMs()
public void setLingerMs(int lingerMs)
public int getRetries()
public void setRetries(int retries)
public int getMaxReservedAttempts()
public void setMaxReservedAttempts(int maxReservedAttempts)
public long getBaseRetryBackoffMs()
public void setBaseRetryBackoffMs(long baseRetryBackoffMs)
public long getMaxRetryBackoffMs()
public void setMaxRetryBackoffMs(long maxRetryBackoffMs)
public String getTopic()
public void setTopic(String topic)
public String getSource()
public void setSource(String source)
public void setMdcFields(String mdcFields)
Copyright © 2021. All rights reserved.