Class RemoteLoggingConfig

java.lang.Object
org.wso2.carbon.logging.service.RemoteLoggingConfig
All Implemented Interfaces:
RemoteLoggingConfigService

@Capability(namespace="osgi.service", attribute={"objectClass=org.wso2.carbon.logging.service.RemoteLoggingConfigService","service.scope=singleton"}) public class RemoteLoggingConfig extends Object implements RemoteLoggingConfigService
This is the Admin service used for configuring the remote server logging configurations
  • Constructor Details

  • Method Details

    • 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:
      addRemoteServerConfig in interface RemoteLoggingConfigService
      Parameters:
      data - RemoteServerLoggerData object that contains the remote server configuration
      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
    • addRemoteServerConfig

      public void addRemoteServerConfig(RemoteServerLoggerData data, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
      Description copied from interface: RemoteLoggingConfigService
      This method is used to add a remote server configuration.
      Specified by:
      addRemoteServerConfig in interface RemoteLoggingConfigService
      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:
      resetRemoteServerConfig in interface RemoteLoggingConfigService
      Parameters:
      data - RemoteServerLoggerData object that contains the remote server configuration
      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, boolean isPeriodicalSyncRequest) throws IOException, org.apache.commons.configuration2.ex.ConfigurationException
      Description copied from interface: RemoteLoggingConfigService
      This method is used to reset the remote server configurations to the defaults.
      Specified by:
      resetRemoteServerConfig in interface RemoteLoggingConfigService
      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: RemoteLoggingConfigService
      This method is used to get the remote server configuration for a given log type.
      Specified by:
      getRemoteServerConfig in interface RemoteLoggingConfigService
      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: RemoteLoggingConfigService
      This method is used to get the remote server configuration for a given log type.
      Specified by:
      getRemoteServerConfig in interface RemoteLoggingConfigService
      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, IOException
      Description copied from interface: RemoteLoggingConfigService
      This method is used to sync the remote server configurations with the remote server.
      Specified by:
      syncRemoteServerConfigs in interface RemoteLoggingConfigService
      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: RemoteLoggingConfigService
      This method is used to get the remote server configurations.
      Specified by:
      getRemoteServerConfigs in interface RemoteLoggingConfigService
      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: RemoteLoggingConfigService
      This method is used to get the remote server configurations.
      Specified by:
      getRemoteServerConfigs in interface RemoteLoggingConfigService
      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.