public class LogUtils
extends java.lang.Object
| Constructor and Description |
|---|
LogUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyLoggerLevel(java.util.Properties props)
Applies the logger level requested through the
wrapperLoggerLevel connection property,
if it's specified. |
static java.lang.String |
logTopology(@Nullable java.util.List<HostSpec> hosts) |
static java.lang.String |
logTopology(@Nullable java.util.List<HostSpec> hosts,
@Nullable java.lang.String messagePrefix) |
static java.lang.String |
toLogString(java.util.Map<java.lang.String,HostSpec> map) |
public static void applyLoggerLevel(java.util.Properties props)
wrapperLoggerLevel connection property,
if it's specified. The level is set on the driver's parent logger
(software.amazon.jdbc), so loggers that have their own level explicitly configured (for
instance, through a logging.properties file) are not affected and keep their configured
level.
This method should be called as early as possible while establishing a connection so that the driver's own log messages are governed by the requested level.
props - the connection properties to get the requested logger level fromjava.lang.IllegalArgumentException - if the specified logger level isn't a valid Levelpublic static java.lang.String logTopology(@Nullable java.util.List<HostSpec> hosts)
public static java.lang.String logTopology(@Nullable java.util.List<HostSpec> hosts, @Nullable java.lang.String messagePrefix)
public static java.lang.String toLogString(java.util.Map<java.lang.String,HostSpec> map)