|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.org.iscream.cms.util.FormatName
This class provides static methods to format the name of a calling object. It's main use is by the various objects within the system to create a toString String to send to the logger.
Field Summary | |
private static String[] |
VERBOSITY_NAMES
An array of names of verbosity levels. |
Constructor Summary | |
private |
FormatName()
A private constructor ensures an instance of this class CANNOT be created. |
Method Summary | |
static String |
formatLogLine(String source,
int verbosity,
String message)
This method generates a nicely formatted line for the log, including the date/time and the source of the message. |
static String |
getName(String friendlyName,
String className,
String revision)
This method takes a set of information about the calling class and constructs a tidy String name to be returned. |
private static String |
tidyClassName(String className)
If the class name begins with uk.org.iscream.cms.server this method will trim it off, otherwise it leaves the string unchanged. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String[] VERBOSITY_NAMES
Constructor Detail |
private FormatName()
Method Detail |
public static String getName(String friendlyName, String className, String revision)
friendlyName
- the configured name of the instance of the calling component the class is in (eg "filter1")className
- the class name of the calling class, as obtained by getClass().getName()revision
- the CVS Revision number for the calling class
public static String formatLogLine(String source, int verbosity, String message)
source
- A string representation of the calling object.verbosity
- The verbosity of the message.message
- The message to be logged.
private static String tidyClassName(String className)
className
- the name of a class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |