Package org.restlet.engine.log
Class LogUtils
- java.lang.Object
-
- org.restlet.engine.log.LogUtils
-
public class LogUtils extends java.lang.Object
Logging related utility methods.- Author:
- Jerome Louvel
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getBestClassName(java.lang.Class<?> clazz)
Return the best class name.static java.lang.String
getLoggerName(java.lang.String baseName, java.lang.Object owner)
Returns a non-null logger name.
-
-
-
Method Detail
-
getBestClassName
public static java.lang.String getBestClassName(java.lang.Class<?> clazz)
Return the best class name. If the class is anonymous, then it returns the super class name.- Parameters:
clazz
- The class to name.- Returns:
- The class name.
-
getLoggerName
public static java.lang.String getLoggerName(java.lang.String baseName, java.lang.Object owner)
Returns a non-null logger name. It is composed by the canonical class name of the owner object suffixed by the owner's hash code.- Parameters:
baseName
- The base logger name to prepend, without a trailing dot.owner
- The context owner.- Returns:
- The logger name.
-
-