ch.qos.logback.ext.loggly
Class AbstractLogglyAppender<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<E>
ch.qos.logback.ext.loggly.AbstractLogglyAppender<E>
- All Implemented Interfaces:
- ch.qos.logback.core.Appender<E>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<E>, ch.qos.logback.core.spi.LifeCycle
- Direct Known Subclasses:
- LogglyAppender, LogglyBatchAppender
public abstract class AbstractLogglyAppender<E>
- extends ch.qos.logback.core.UnsynchronizedAppenderBase<E>
Common base for Loggly appenders.
- Author:
- MÃ¥rten Gustafson, Les Hazlewood, Cyrille Le Clerc
| Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase |
name, started |
| Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
context |
| Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase |
addFilter, append, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString |
| Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
| Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
DEFAULT_ENDPOINT_PREFIX
public static final String DEFAULT_ENDPOINT_PREFIX
- See Also:
- Constant Field Values
DEFAULT_LAYOUT_PATTERN
public static final String DEFAULT_LAYOUT_PATTERN
- See Also:
- Constant Field Values
UTF_8
protected static final Charset UTF_8
endpointUrl
protected String endpointUrl
inputKey
protected String inputKey
layout
protected ch.qos.logback.core.Layout<E> layout
layoutCreatedImplicitly
protected boolean layoutCreatedImplicitly
proxy
protected Proxy proxy
AbstractLogglyAppender
public AbstractLogglyAppender()
start
public void start()
- Specified by:
start in interface ch.qos.logback.core.spi.LifeCycle- Overrides:
start in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
stop
public void stop()
- Specified by:
stop in interface ch.qos.logback.core.spi.LifeCycle- Overrides:
stop in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
toBytes
protected byte[] toBytes(InputStream is)
throws IOException
- Throws:
IOException
readResponseBody
protected String readResponseBody(InputStream input)
throws IOException
- Throws:
IOException
ensureLayout
protected final void ensureLayout()
createLayout
protected ch.qos.logback.core.Layout<E> createLayout()
buildEndpointUrl
protected String buildEndpointUrl(String inputKey)
getEndpointPrefix
protected abstract String getEndpointPrefix()
- Returns the URL path prefix for the Loggly endpoint to which the
implementing class will send log events. This path prefix varies
for the different Loggly services. The final endpoint URL is built
by concatenating the
DEFAULT_ENDPOINT_PREFIX with the
endpoint prefix from getEndpointPrefix() and the
inputKey.
- Returns:
- the URL path prefix for the Loggly endpoint
getEndpointUrl
public String getEndpointUrl()
setEndpointUrl
public void setEndpointUrl(String endpointUrl)
getInputKey
public String getInputKey()
setInputKey
public void setInputKey(String inputKey)
getPattern
public String getPattern()
setPattern
public void setPattern(String pattern)
getLayout
public ch.qos.logback.core.Layout<E> getLayout()
setLayout
public void setLayout(ch.qos.logback.core.Layout<E> layout)
getProxyPort
public int getProxyPort()
setProxyPort
public void setProxyPort(int proxyPort)
setProxyPort
public void setProxyPort(String proxyPort)
getProxyHost
public String getProxyHost()
setProxyHost
public void setProxyHost(String proxyHost)
getHttpReadTimeoutInMillis
public int getHttpReadTimeoutInMillis()
setHttpReadTimeoutInMillis
public void setHttpReadTimeoutInMillis(int httpReadTimeoutInMillis)
Copyright © 2014-2015. All Rights Reserved.