Class InternalLogFactory
java.lang.Object
com.amazonaws.log.InternalLogFactory
- Direct Known Subclasses:
CommonsLogFactory, JulLogFactory
Can be used to configure the default log factory for the AWSJavaClientCore
and AWSJavaClientSigners. Default to JUL, unless AWSJavaClientRuntime is
present which will default it to Jakarta Commons Logging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanconfigureFactory(InternalLogFactory factory) Used to explicitly configure the log factory.protected abstract InternalLogApiSPI to return a logger given a class.protected abstract InternalLogApiSPI to return a logger given a name.static InternalLogFactoryReturns the current default log factory.static InternalLogApiReturns an SDK logger that logs using the currently configured default log factory, given the class.static InternalLogApiReturns an SDK logger that logs using the currently configured default log factory, given the name.
-
Constructor Details
-
InternalLogFactory
public InternalLogFactory()
-
-
Method Details
-
getLog
Returns an SDK logger that logs using the currently configured default log factory, given the class. -
getLog
Returns an SDK logger that logs using the currently configured default log factory, given the name. -
doGetLog
SPI to return a logger given a class. -
doGetLog
SPI to return a logger given a name. -
getFactory
Returns the current default log factory. -
configureFactory
Used to explicitly configure the log factory. The log factory can only be configured at most once. All subsequent configurations will have no effect. Note explicitly configuring the log factory will have positive performance impact on all subsequent logging, since the specific logger can be directly referenced instead of being searched every time.- Parameters:
factory- the log factory to be used internally by the SDK- Returns:
- true if the log factory is successfully configured; false otherwise (ie the log factory is not allowed to be configured more than once for performance reasons.)
-