Package com.exasol.adapter.request
Class LoggingConfiguration
- java.lang.Object
-
- com.exasol.adapter.request.LoggingConfiguration
-
public final class LoggingConfiguration extends Object
This class represents the logging configuration set in the request properties
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggingConfiguration
createLocalLoggingConfiguration(Map<String,String> properties)
Create local logging configuration logging configuration.Level
getLogLevel()
Get the log levelString
getRemoteLoggingHost()
Get the name of the host where the log should be sent toint
getRemoteLoggingPort()
Get the port the remote log receiver is listening onboolean
isRemoteLoggingConfigured()
Check if the adapter should send its log messages to a remote receiverstatic LoggingConfiguration
parseFromProperties(Map<String,String> properties)
Create a new logging configuration from request propertiesstatic LoggingConfiguration
parseFromPropertiesWithDebugAddressGiven(Map<String,String> properties)
Create a logging config from properties.
-
-
-
Method Detail
-
isRemoteLoggingConfigured
public boolean isRemoteLoggingConfigured()
Check if the adapter should send its log messages to a remote receiver- Returns:
true
if the adapter should send its log messages to a remote log receiver
-
getRemoteLoggingHost
public String getRemoteLoggingHost()
Get the name of the host where the log should be sent to- Returns:
- name host name where the log receiver listens
-
getRemoteLoggingPort
public int getRemoteLoggingPort()
Get the port the remote log receiver is listening on- Returns:
- remote logging port
-
getLogLevel
public Level getLogLevel()
Get the log level- Returns:
- log level
-
parseFromProperties
public static LoggingConfiguration parseFromProperties(Map<String,String> properties)
Create a new logging configuration from request properties- Parameters:
properties
- request properties- Returns:
- logging configuration
- Throws:
IllegalArgumentException
- if any of the logging configuration parameters can't be parsed
-
parseFromPropertiesWithDebugAddressGiven
public static LoggingConfiguration parseFromPropertiesWithDebugAddressGiven(Map<String,String> properties)
Create a logging config from properties.- Parameters:
properties
- properties map- Returns:
- read logging configuration
-
createLocalLoggingConfiguration
public static LoggingConfiguration createLocalLoggingConfiguration(Map<String,String> properties)
Create local logging configuration logging configuration.- Parameters:
properties
- the properties- Returns:
- the logging configuration
-
-