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 Object implements org.apache.logging.log4j.core.util.Builder<AmqpAppender>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
-
-
-
Method Detail
-
setConfiguration
public AmqpAppender.Builder setConfiguration(org.apache.logging.log4j.core.config.Configuration configuration)
-
setName
public AmqpAppender.Builder setName(String name)
-
setLayout
public AmqpAppender.Builder setLayout(org.apache.logging.log4j.core.Layout<? extends 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(URI uri)
-
setHost
public AmqpAppender.Builder setHost(String host)
-
setPort
public AmqpAppender.Builder setPort(String port)
-
setAddresses
public AmqpAppender.Builder setAddresses(String addresses)
-
setUser
public AmqpAppender.Builder setUser(String user)
-
setPassword
public AmqpAppender.Builder setPassword(String password)
-
setVirtualHost
public AmqpAppender.Builder setVirtualHost(String virtualHost)
-
setUseSsl
public AmqpAppender.Builder setUseSsl(boolean useSsl)
-
setVerifyHostname
public AmqpAppender.Builder setVerifyHostname(boolean verifyHostname)
-
setSslAlgorithm
public AmqpAppender.Builder setSslAlgorithm(String sslAlgorithm)
-
setSslPropertiesLocation
public AmqpAppender.Builder setSslPropertiesLocation(String sslPropertiesLocation)
-
setKeyStore
public AmqpAppender.Builder setKeyStore(String keyStore)
-
setKeyStorePassphrase
public AmqpAppender.Builder setKeyStorePassphrase(String keyStorePassphrase)
-
setKeyStoreType
public AmqpAppender.Builder setKeyStoreType(String keyStoreType)
-
setTrustStore
public AmqpAppender.Builder setTrustStore(String trustStore)
-
setTrustStorePassphrase
public AmqpAppender.Builder setTrustStorePassphrase(String trustStorePassphrase)
-
setTrustStoreType
public AmqpAppender.Builder setTrustStoreType(String trustStoreType)
-
setSaslConfig
public AmqpAppender.Builder setSaslConfig(String saslConfig)
-
setSenderPoolSize
public AmqpAppender.Builder setSenderPoolSize(int senderPoolSize)
-
setMaxSenderRetries
public AmqpAppender.Builder setMaxSenderRetries(int maxSenderRetries)
-
setApplicationId
public AmqpAppender.Builder setApplicationId(String applicationId)
-
setRoutingKeyPattern
public AmqpAppender.Builder setRoutingKeyPattern(String routingKeyPattern)
-
setGenerateId
public AmqpAppender.Builder setGenerateId(boolean generateId)
-
setDeliveryMode
public AmqpAppender.Builder setDeliveryMode(String deliveryMode)
-
setExchange
public AmqpAppender.Builder setExchange(String exchange)
-
setExchangeType
public AmqpAppender.Builder setExchangeType(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(String contentType)
-
setContentEncoding
public AmqpAppender.Builder setContentEncoding(String contentEncoding)
-
setConnectionName
public AmqpAppender.Builder setConnectionName(String connectionName)
-
setClientConnectionProperties
public AmqpAppender.Builder setClientConnectionProperties(String clientConnectionProperties)
-
setAsync
public AmqpAppender.Builder setAsync(boolean async)
-
setCharset
public AmqpAppender.Builder setCharset(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(String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends Serializable> layout, boolean ignoreExceptions, AmqpAppender.AmqpManager manager, 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
-
-