Package org.wso2.carbon.logging.service
Class RemoteLoggingConfig
- java.lang.Object
-
- org.wso2.carbon.logging.service.RemoteLoggingConfig
-
- All Implemented Interfaces:
RemoteLoggingConfigService
public class RemoteLoggingConfig extends Object implements RemoteLoggingConfigService
This is the Admin service used for configuring the remote server logging configurations
-
-
Constructor Summary
Constructors Constructor Description RemoteLoggingConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRemoteServerConfig(RemoteServerLoggerData data)This method is used to add a remote server configurationvoidaddRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest)This method is used to add a remote server configuration.RemoteServerLoggerDatagetRemoteServerConfig(String logType)This method is used to get the remote server configuration for a given log type.RemoteServerLoggerDatagetRemoteServerConfig(String logType, boolean includeSecrets)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.List<RemoteServerLoggerData>getRemoteServerConfigs(boolean includeSecrets)This method is used to get the remote server configurations.voidresetRemoteServerConfig(RemoteServerLoggerData data)This method is used to reset the remote server configurations to the defaultsvoidresetRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest)This method is used to reset the remote server configurations to the defaults.voidsyncRemoteServerConfigs()This method is used to sync the remote server configurations with the remote server.
-
-
-
Constructor Detail
-
RemoteLoggingConfig
public RemoteLoggingConfig() throws IOException- Throws:
IOException
-
-
Method Detail
-
addRemoteServerConfig
public void addRemoteServerConfig(RemoteServerLoggerData data) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
This method is used to add a remote server configuration- Specified by:
addRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
data- RemoteServerLoggerData object that contains the remote server configuration- Throws:
IOException- if an error occurs while writing to the log4j2.properties fileorg.apache.commons.configuration2.ex.ConfigurationException- if an error occurs while loading the log4j2.properties file
-
addRemoteServerConfig
public void addRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to add a remote server configuration.- Specified by:
addRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
data- RemoteServerLoggerData object that contains the remote server configuration.isPeriodicalSyncRequest- Boolean value to indicate whether the request is a periodical sync request or not.- Throws:
IOException- If an error occurs while writing to the log4j2.properties file.org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
resetRemoteServerConfig
public void resetRemoteServerConfig(RemoteServerLoggerData data) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
This method is used to reset the remote server configurations to the defaults- Specified by:
resetRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
data- RemoteServerLoggerData object that contains the remote server configuration- Throws:
IOException- if an error occurs while writing to the log4j2.properties fileorg.apache.commons.configuration2.ex.ConfigurationException- if an error occurs while loading the log4j2.properties file
-
resetRemoteServerConfig
public void resetRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to reset the remote server configurations to the defaults.- Specified by:
resetRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
data- RemoteServerLoggerData object that contains the remote server configuration.isPeriodicalSyncRequest- Boolean value to indicate whether the request is a periodical sync request or not.- Throws:
IOException- If an error occurs while writing to the log4j2.properties file.org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
getRemoteServerConfig
public RemoteServerLoggerData getRemoteServerConfig(String logType) throws org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to get the remote server configuration for a given log type.- Specified by:
getRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
logType- The log type of the remote server configuration.- Returns:
- RemoteServerLoggerData object that contains the remote server configuration.
- Throws:
org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
getRemoteServerConfig
public RemoteServerLoggerData getRemoteServerConfig(String logType, boolean includeSecrets) throws org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to get the remote server configuration for a given log type.- Specified by:
getRemoteServerConfigin interfaceRemoteLoggingConfigService- Parameters:
logType- The log type of the remote server configuration.includeSecrets- Boolean value to indicate whether to include secrets in the response or not.- Returns:
- RemoteServerLoggerData object that contains the remote server configuration.
- Throws:
org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
syncRemoteServerConfigs
public void syncRemoteServerConfigs() throws org.apache.commons.configuration2.ex.ConfigurationException, IOExceptionDescription copied from interface:RemoteLoggingConfigServiceThis method is used to sync the remote server configurations with the remote server.- Specified by:
syncRemoteServerConfigsin interfaceRemoteLoggingConfigService- Throws:
org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the configurations from database.IOException
-
getRemoteServerConfigs
public List<RemoteServerLoggerData> getRemoteServerConfigs() throws org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to get the remote server configurations.- Specified by:
getRemoteServerConfigsin interfaceRemoteLoggingConfigService- Returns:
- List of RemoteServerLoggerData objects that contains the remote server configurations.
- Throws:
org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
getRemoteServerConfigs
public List<RemoteServerLoggerData> getRemoteServerConfigs(boolean includeSecrets) throws org.apache.commons.configuration2.ex.ConfigurationException
Description copied from interface:RemoteLoggingConfigServiceThis method is used to get the remote server configurations.- Specified by:
getRemoteServerConfigsin interfaceRemoteLoggingConfigService- Parameters:
includeSecrets- Boolean value to indicate whether to include secrets in the response or not.- Returns:
- List of RemoteServerLoggerData objects that contains the remote server configurations.
- Throws:
org.apache.commons.configuration2.ex.ConfigurationException- If an error occurs while loading the log4j2.properties file.
-
-