java.lang.Object
org.wso2.carbon.logging.service.util.Utils

public class Utils extends Object
Utility class with methods used by logging service.
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getProperty

      public static String getProperty(File srcFile, String key) throws IOException
      Util method to return the specified property from a properties file.
      Parameters:
      srcFile - - The source file which needs to be looked up.
      key - - Key of the property.
      Returns:
      - Value of the property.
      Throws:
      IOException
    • getKeysOfAppender

      public static ArrayList<String> getKeysOfAppender(File srcFile, String appenderName) throws IOException
      Util method to return the list of keys for a given appender.
      Parameters:
      srcFile - - The source file which needs to be looked up.
      appenderName - - Name of the appender.
      Returns:
      - List of keys for the given appender.
      Throws:
      IOException - - Error occurred while reading the input stream.
    • getKeyValuesOfAppender

      public static Map<String,String> getKeyValuesOfAppender(File srcFile, String appenderName) throws IOException
      Throws:
      IOException