public class RemoteLoggingConfig extends Object implements RemoteLoggingConfigService
Constructor and Description |
---|
RemoteLoggingConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addRemoteServerConfig(RemoteServerLoggerData data)
This method is used to add a remote server configuration
|
void |
addRemoteServerConfig(RemoteServerLoggerData data,
boolean isPeriodicalSyncRequest)
This method is used to add a remote server configuration.
|
RemoteServerLoggerData |
getRemoteServerConfig(String logType)
This method is used to get the remote server configuration for a given log type.
|
List<RemoteServerLoggerData> |
getRemoteServerConfigs()
This method is used to get the remote server configurations.
|
void |
resetRemoteServerConfig(RemoteServerLoggerData data)
This method is used to reset the remote server configurations to the defaults
|
void |
resetRemoteServerConfig(RemoteServerLoggerData data,
boolean isPeriodicalSyncRequest)
This method is used to reset the remote server configurations to the defaults.
|
void |
syncRemoteServerConfigs()
This method is used to sync the remote server configurations with the remote server.
|
public RemoteLoggingConfig() throws IOException
IOException
public void addRemoteServerConfig(RemoteServerLoggerData data) throws IOException, org.apache.commons.configuration.ConfigurationException
addRemoteServerConfig
in interface RemoteLoggingConfigService
data
- RemoteServerLoggerData object that contains the remote server configurationIOException
- if an error occurs while writing to the log4j2.properties fileorg.apache.commons.configuration.ConfigurationException
- if an error occurs while loading the log4j2.properties filepublic void addRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration.ConfigurationException
RemoteLoggingConfigService
addRemoteServerConfig
in interface RemoteLoggingConfigService
data
- RemoteServerLoggerData object that contains the remote server configuration.isPeriodicalSyncRequest
- Boolean value to indicate whether the request is a periodical sync request or not.IOException
- If an error occurs while writing to the log4j2.properties file.org.apache.commons.configuration.ConfigurationException
- If an error occurs while loading the log4j2.properties file.public void resetRemoteServerConfig(RemoteServerLoggerData data) throws IOException, org.apache.commons.configuration.ConfigurationException
resetRemoteServerConfig
in interface RemoteLoggingConfigService
data
- RemoteServerLoggerData object that contains the remote server configurationIOException
- if an error occurs while writing to the log4j2.properties fileorg.apache.commons.configuration.ConfigurationException
- if an error occurs while loading the log4j2.properties filepublic void resetRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration.ConfigurationException
RemoteLoggingConfigService
resetRemoteServerConfig
in interface RemoteLoggingConfigService
data
- RemoteServerLoggerData object that contains the remote server configuration.isPeriodicalSyncRequest
- Boolean value to indicate whether the request is a periodical sync request or not.IOException
- If an error occurs while writing to the log4j2.properties file.org.apache.commons.configuration.ConfigurationException
- If an error occurs while loading the log4j2.properties file.public RemoteServerLoggerData getRemoteServerConfig(String logType) throws org.apache.commons.configuration.ConfigurationException
RemoteLoggingConfigService
getRemoteServerConfig
in interface RemoteLoggingConfigService
logType
- The log type of the remote server configuration.org.apache.commons.configuration.ConfigurationException
- If an error occurs while loading the log4j2.properties file.public void syncRemoteServerConfigs() throws org.apache.commons.configuration.ConfigurationException, IOException
RemoteLoggingConfigService
syncRemoteServerConfigs
in interface RemoteLoggingConfigService
org.apache.commons.configuration.ConfigurationException
- If an error occurs while loading the configurations from database.IOException
public List<RemoteServerLoggerData> getRemoteServerConfigs() throws org.apache.commons.configuration.ConfigurationException
RemoteLoggingConfigService
getRemoteServerConfigs
in interface RemoteLoggingConfigService
org.apache.commons.configuration.ConfigurationException
- If an error occurs while loading the log4j2.properties file.Copyright © 2024 WSO2. All rights reserved.