public class Logger extends Object
| Constructor and Description |
|---|
Logger() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(String format,
Object[] objs)
Formats a message.
|
static String |
formatDate(Date d)
Convert a Date to a timestamp String.
|
static String |
getTimeStamp()
Gets a String representation of the current time.
|
static void |
put(PrintWriter log,
String msg)
Logs a message to the specified log destination.
|
static void |
put(PrintWriter log,
String msg,
Throwable exception)
Logs a message and an exception to the specified log destination.
|
static void |
put(PrintWriter log,
Throwable exception)
Logs an exception to the specified log destination.
|
static void |
put(String msg)
Logs a message to the static log destination.
|
static void |
put(String msg,
Throwable exception)
Logs a message and an exception to the static log destination.
|
static void |
put(Throwable exception)
Logs an exception to the static log destination.
|
public static String getTimeStamp()
public static String formatDate(Date d)
d - a Date to format as a timestamp String.public static void put(String msg)
msg - the actual message to logpublic static void put(PrintWriter log, String msg)
log - the PrintWriter that the message will be written to.msg - the actual message to logpublic static void put(Throwable exception)
exception - the actual Exception to logpublic static void put(PrintWriter log, Throwable exception)
log - the PrintWriter that the message will be written to.exception - the actual Exception to logpublic static void put(String msg, Throwable exception)
msg - the actual message to logexception - the actual Exception to logpublic static void put(PrintWriter log, String msg, Throwable exception)
log - the PrintWriter that the message will be written to. If null then the default stdout writer is used.msg - the actual message to logexception - the actual Exception to logCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.