Package org.apache.qpid.protonj2.logging
Class ProtonLoggerFactory
java.lang.Object
org.apache.qpid.protonj2.logging.ProtonLoggerFactory
- Direct Known Subclasses:
- NoOpProtonLoggerFactory,- Slf4JLoggerFactory
Factory used to create Proton Logger abstractions
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract ProtonLoggercreateLoggerWrapper(String name) static ProtonLoggerLogger lookup based on theClassthat will host the logger instance.static ProtonLoggerLogger lookup based on the given logger name that will host the logger instance.static ProtonLoggerFactoryReturns aProtonLoggerFactoryinstance.static voidsetLoggerFactory(ProtonLoggerFactory factory) Configure Proton with a custom ProtonLoggerFactory implementation which will be used by the Proton classes when logging library events.
- 
Constructor Details- 
ProtonLoggerFactorypublic ProtonLoggerFactory()
 
- 
- 
Method Details- 
getLoggerFactoryReturns aProtonLoggerFactoryinstance.The factory returned depends on the configuration and available logger implementations at the time this method is called. If a custom ProtonLoggerFactory is configured than that instance is returned, otherwise this class will attempt to find a factory for the slf4j logger library. - Returns:
- a ProtonLoggerFactorythat will be used by this library.
 
- 
setLoggerFactoryConfigure Proton with a custom ProtonLoggerFactory implementation which will be used by the Proton classes when logging library events.- Parameters:
- factory- The- ProtonLoggerFactoryto use when loggers are requested.
- Throws:
- IllegalArgumentException- if the factory given is null.
 
- 
getLoggerLogger lookup based on theClassthat will host the logger instance.- Parameters:
- clazz- The- Classthat will host the logger instance being requested.
- Returns:
- a ProtonLoggerthat is tied to the givenClassinstance.
 
- 
getLoggerLogger lookup based on the given logger name that will host the logger instance.- Parameters:
- name- The given name that will host the logger instance being requested.
- Returns:
- a ProtonLoggerthat is tied to the given logger name.
 
- 
createLoggerWrapper
 
-