Class Utils
java.lang.Object
org.wso2.carbon.logging.service.util.Utils
Utility class with methods used by logging service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKeysOfAppender(File srcFile, String appenderName) Util method to return the list of keys for a given appender.getKeyValuesOfAppender(File srcFile, String appenderName) static StringgetProperty(File srcFile, String key) Util method to return the specified property from a properties file.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getProperty
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
-