org.restlet.engine.log
Class LogUtils

java.lang.Object
  extended by org.restlet.engine.log.LogUtils

public class LogUtils
extends Object

Logging related utility methods.

Author:
Jerome Louvel

Method Summary
static String getBestClassName(Class<?> clazz)
          Return the best class name.
static String getLoggerName(String baseName, Object owner)
          Returns a non-null logger name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBestClassName

public static String getBestClassName(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 String getLoggerName(String baseName,
                                   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.


Copyright © 2005-2013 Restlet.