Package com.exasol.adapter.request
Class LoggingConfiguration
- java.lang.Object
-
- com.exasol.adapter.request.LoggingConfiguration
-
- All Implemented Interfaces:
Serializable
public final class LoggingConfiguration extends Object implements Serializable
This class represents the logging configuration set in the request properties- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggingConfigurationcreateLocalLoggingConfiguration(Map<String,String> properties)Create local logging configuration logging configuration.LevelgetLogLevel()Get the log levelStringgetRemoteLoggingHost()Get the name of the host where the log should be sent tointgetRemoteLoggingPort()Get the port the remote log receiver is listening onbooleanisRemoteLoggingConfigured()Check if the adapter should send its log messages to a remote receiverstatic LoggingConfigurationparseFromProperties(Map<String,String> properties)Create a new logging configuration from request propertiesstatic LoggingConfigurationparseFromPropertiesWithDebugAddressGiven(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:
trueif 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
-
-