Class AmqpAppender.Builder
- java.lang.Object
-
- org.springframework.amqp.rabbit.log4j2.AmqpAppender.Builder
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.util.Builder<AmqpAppender>
- Enclosing class:
- AmqpAppender
protected static class AmqpAppender.Builder extends java.lang.Object implements org.apache.logging.log4j.core.util.Builder<AmqpAppender>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmqpAppender
build()
protected AmqpAppender
buildInstance(java.lang.String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout, boolean ignoreExceptions, AmqpAppender.AmqpManager manager, java.util.concurrent.BlockingQueue<AmqpAppender.Event> eventQueue)
Subclasses can extends Builder, use same logic but need to modify class instance.AmqpAppender.Builder
setAddMdcAsHeaders(boolean addMdcAsHeaders)
AmqpAppender.Builder
setAddresses(java.lang.String addresses)
AmqpAppender.Builder
setApplicationId(java.lang.String applicationId)
AmqpAppender.Builder
setAsync(boolean async)
AmqpAppender.Builder
setAutoDelete(boolean autoDelete)
AmqpAppender.Builder
setBlockingQueueFactory(org.apache.logging.log4j.core.async.BlockingQueueFactory<AmqpAppender.Event> blockingQueueFactory)
AmqpAppender.Builder
setBufferSize(int bufferSize)
AmqpAppender.Builder
setCharset(java.lang.String charset)
AmqpAppender.Builder
setClientConnectionProperties(java.lang.String clientConnectionProperties)
AmqpAppender.Builder
setConfiguration(org.apache.logging.log4j.core.config.Configuration configuration)
AmqpAppender.Builder
setConnectionName(java.lang.String connectionName)
AmqpAppender.Builder
setContentEncoding(java.lang.String contentEncoding)
AmqpAppender.Builder
setContentType(java.lang.String contentType)
AmqpAppender.Builder
setDeclareExchange(boolean declareExchange)
AmqpAppender.Builder
setDeliveryMode(java.lang.String deliveryMode)
AmqpAppender.Builder
setDurable(boolean durable)
AmqpAppender.Builder
setExchange(java.lang.String exchange)
AmqpAppender.Builder
setExchangeType(java.lang.String exchangeType)
AmqpAppender.Builder
setFilter(org.apache.logging.log4j.core.Filter filter)
AmqpAppender.Builder
setGenerateId(boolean generateId)
AmqpAppender.Builder
setHost(java.lang.String host)
AmqpAppender.Builder
setIgnoreExceptions(boolean ignoreExceptions)
AmqpAppender.Builder
setKeyStore(java.lang.String keyStore)
AmqpAppender.Builder
setKeyStorePassphrase(java.lang.String keyStorePassphrase)
AmqpAppender.Builder
setKeyStoreType(java.lang.String keyStoreType)
AmqpAppender.Builder
setLayout(org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout)
AmqpAppender.Builder
setMaxSenderRetries(int maxSenderRetries)
AmqpAppender.Builder
setName(java.lang.String name)
AmqpAppender.Builder
setPassword(java.lang.String password)
AmqpAppender.Builder
setPort(java.lang.String port)
AmqpAppender.Builder
setRoutingKeyPattern(java.lang.String routingKeyPattern)
AmqpAppender.Builder
setSaslConfig(java.lang.String saslConfig)
AmqpAppender.Builder
setSenderPoolSize(int senderPoolSize)
AmqpAppender.Builder
setSslAlgorithm(java.lang.String sslAlgorithm)
AmqpAppender.Builder
setSslPropertiesLocation(java.lang.String sslPropertiesLocation)
AmqpAppender.Builder
setTrustStore(java.lang.String trustStore)
AmqpAppender.Builder
setTrustStorePassphrase(java.lang.String trustStorePassphrase)
AmqpAppender.Builder
setTrustStoreType(java.lang.String trustStoreType)
AmqpAppender.Builder
setUri(java.net.URI uri)
AmqpAppender.Builder
setUser(java.lang.String user)
AmqpAppender.Builder
setUseSsl(boolean useSsl)
AmqpAppender.Builder
setVerifyHostname(boolean verifyHostname)
AmqpAppender.Builder
setVirtualHost(java.lang.String virtualHost)
-
-
-
Method Detail
-
setConfiguration
public AmqpAppender.Builder setConfiguration(org.apache.logging.log4j.core.config.Configuration configuration)
-
setName
public AmqpAppender.Builder setName(java.lang.String name)
-
setLayout
public AmqpAppender.Builder setLayout(org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout)
-
setFilter
public AmqpAppender.Builder setFilter(org.apache.logging.log4j.core.Filter filter)
-
setIgnoreExceptions
public AmqpAppender.Builder setIgnoreExceptions(boolean ignoreExceptions)
-
setUri
public AmqpAppender.Builder setUri(java.net.URI uri)
-
setHost
public AmqpAppender.Builder setHost(java.lang.String host)
-
setPort
public AmqpAppender.Builder setPort(java.lang.String port)
-
setAddresses
public AmqpAppender.Builder setAddresses(java.lang.String addresses)
-
setUser
public AmqpAppender.Builder setUser(java.lang.String user)
-
setPassword
public AmqpAppender.Builder setPassword(java.lang.String password)
-
setVirtualHost
public AmqpAppender.Builder setVirtualHost(java.lang.String virtualHost)
-
setUseSsl
public AmqpAppender.Builder setUseSsl(boolean useSsl)
-
setVerifyHostname
public AmqpAppender.Builder setVerifyHostname(boolean verifyHostname)
-
setSslAlgorithm
public AmqpAppender.Builder setSslAlgorithm(java.lang.String sslAlgorithm)
-
setSslPropertiesLocation
public AmqpAppender.Builder setSslPropertiesLocation(java.lang.String sslPropertiesLocation)
-
setKeyStore
public AmqpAppender.Builder setKeyStore(java.lang.String keyStore)
-
setKeyStorePassphrase
public AmqpAppender.Builder setKeyStorePassphrase(java.lang.String keyStorePassphrase)
-
setKeyStoreType
public AmqpAppender.Builder setKeyStoreType(java.lang.String keyStoreType)
-
setTrustStore
public AmqpAppender.Builder setTrustStore(java.lang.String trustStore)
-
setTrustStorePassphrase
public AmqpAppender.Builder setTrustStorePassphrase(java.lang.String trustStorePassphrase)
-
setTrustStoreType
public AmqpAppender.Builder setTrustStoreType(java.lang.String trustStoreType)
-
setSaslConfig
public AmqpAppender.Builder setSaslConfig(java.lang.String saslConfig)
-
setSenderPoolSize
public AmqpAppender.Builder setSenderPoolSize(int senderPoolSize)
-
setMaxSenderRetries
public AmqpAppender.Builder setMaxSenderRetries(int maxSenderRetries)
-
setApplicationId
public AmqpAppender.Builder setApplicationId(java.lang.String applicationId)
-
setRoutingKeyPattern
public AmqpAppender.Builder setRoutingKeyPattern(java.lang.String routingKeyPattern)
-
setGenerateId
public AmqpAppender.Builder setGenerateId(boolean generateId)
-
setDeliveryMode
public AmqpAppender.Builder setDeliveryMode(java.lang.String deliveryMode)
-
setExchange
public AmqpAppender.Builder setExchange(java.lang.String exchange)
-
setExchangeType
public AmqpAppender.Builder setExchangeType(java.lang.String exchangeType)
-
setDeclareExchange
public AmqpAppender.Builder setDeclareExchange(boolean declareExchange)
-
setDurable
public AmqpAppender.Builder setDurable(boolean durable)
-
setAutoDelete
public AmqpAppender.Builder setAutoDelete(boolean autoDelete)
-
setContentType
public AmqpAppender.Builder setContentType(java.lang.String contentType)
-
setContentEncoding
public AmqpAppender.Builder setContentEncoding(java.lang.String contentEncoding)
-
setConnectionName
public AmqpAppender.Builder setConnectionName(java.lang.String connectionName)
-
setClientConnectionProperties
public AmqpAppender.Builder setClientConnectionProperties(java.lang.String clientConnectionProperties)
-
setAsync
public AmqpAppender.Builder setAsync(boolean async)
-
setCharset
public AmqpAppender.Builder setCharset(java.lang.String charset)
-
setBufferSize
public AmqpAppender.Builder setBufferSize(int bufferSize)
-
setBlockingQueueFactory
public AmqpAppender.Builder setBlockingQueueFactory(org.apache.logging.log4j.core.async.BlockingQueueFactory<AmqpAppender.Event> blockingQueueFactory)
-
setAddMdcAsHeaders
public AmqpAppender.Builder setAddMdcAsHeaders(boolean addMdcAsHeaders)
-
build
public AmqpAppender build()
- Specified by:
build
in interfaceorg.apache.logging.log4j.core.util.Builder<AmqpAppender>
-
buildInstance
protected AmqpAppender buildInstance(java.lang.String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout, boolean ignoreExceptions, AmqpAppender.AmqpManager manager, java.util.concurrent.BlockingQueue<AmqpAppender.Event> eventQueue)
Subclasses can extends Builder, use same logic but need to modify class instance.- Parameters:
name
- The Appender name.filter
- The Filter to associate with the Appender.layout
- The layout to use to format the event.ignoreExceptions
- If true, exceptions will be logged and suppressed. If false errors will be logged and then passed to the application.manager
- Manager class for the appender.eventQueue
- Where LoggingEvents are queued to send.- Returns:
AmqpAppender
-
-