Package org.opends.server.loggers
Class LoggingCategoryNames
- java.lang.Object
-
- org.opends.server.loggers.LoggingCategoryNames
-
public class LoggingCategoryNames extends Object
Provides mapping from class names to simple category names used for logging.Given a classname, eg org.forgerock.opendj.server.core.SomeClass, it allows to get the corresponding simplified category name if it exists, eg "CORE". If no simplified category name exist, the classname is used as a category name.
-
-
Constructor Summary
Constructors Constructor Description LoggingCategoryNames()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetCategoryName(String className)Returns the simple category name corresponding to the provided class name or the class name if no mapping corresponds.static StringgetCategoryName(String className, String fallbackCategory)Returns the simple category name corresponding to the provided class name or a class name if no mapping corresponds.
-
-
-
Method Detail
-
getCategoryName
public static String getCategoryName(String className)
Returns the simple category name corresponding to the provided class name or the class name if no mapping corresponds.- Parameters:
className- The classname to retrieve the category name from.- Returns:
- the simple category name, or the provided className if no matching simple category name is found
-
getCategoryName
public static String getCategoryName(String className, String fallbackCategory)
Returns the simple category name corresponding to the provided class name or a class name if no mapping corresponds. The returned class name will befallbackCategoryif the class name is null.- Parameters:
className- The classname to retrieve the category name from.fallbackCategory- The category to return when className is null.- Returns:
- the simple category name, or the provided className if no matching simple category name is found
-
-