Class Utils


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

      • Utils

        public Utils()
    • Method Detail

      • 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.