org.sandev.tools.util
Class SandTimestampLogger
java.lang.Object
org.sandev.tools.util.SandLogger
org.sandev.tools.util.SandTimestampLogger
- All Implemented Interfaces:
- org.sandev.basics.nodecommon.Logger
public class SandTimestampLogger
- extends SandLogger
- implements org.sandev.basics.nodecommon.Logger
An extension of the basic println logger that adds a timestamp. This is
appropriate for use within a container that wraps stdout but does not
provide timestamps.
|
Field Summary |
protected java.text.SimpleDateFormat |
sdf
Timestamp formatting set at initialization. |
| Fields inherited from interface org.sandev.basics.nodecommon.Logger |
LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_FATAL, LOGLEVEL_INFO, LOGLEVEL_STR_DEBUG, LOGLEVEL_STR_ERROR, LOGLEVEL_STR_FATAL, LOGLEVEL_STR_INFO, LOGLEVEL_STR_WARN, LOGLEVEL_STRINGS, LOGLEVEL_WARN |
|
Method Summary |
void |
init(java.lang.String instanceName)
Initialize our native logger using the specified instance name |
void |
log(int severity,
java.lang.String msg)
Implementation of the required log method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sandev.basics.nodecommon.Logger |
getLogLevel, setLogLevel |
sdf
protected java.text.SimpleDateFormat sdf
- Timestamp formatting set at initialization.
SandTimestampLogger
public SandTimestampLogger()
- Default ctor does nothing. Call the init method for setup.
init
public void init(java.lang.String instanceName)
throws org.sandev.basics.nodecommon.LoggerException
- Initialize our native logger using the specified instance name
- Specified by:
init in interface org.sandev.basics.nodecommon.Logger- Overrides:
init in class SandLogger
- Throws:
org.sandev.basics.nodecommon.LoggerException
log
public void log(int severity,
java.lang.String msg)
throws org.sandev.basics.nodecommon.LoggerException
- Implementation of the required log method. See the Logger interface
documentation for details.
- Specified by:
log in interface org.sandev.basics.nodecommon.Logger- Overrides:
log in class SandLogger
- Throws:
org.sandev.basics.nodecommon.LoggerException