package log; import java.io.Serializable; import java.util.Date; /** * An entry in the log file. * * <p>A LogEntry does as a minimum always indicate the log time and log date.</p> * * <p>LogEnry is <i>abstract</i> to indicate it does not yet do anything sensible.</p> * * @see Loggable * @see Log * * @author Steffen Zschaler * @version 1.0 * @since v1.0 */ public abstract class LogEntry extends Object implements Serializable { /** * Date and time of logging. * * @serial */ private Date m_dtLogDate = null; {m_dtLogDate = new Date();} /** * Return a String describing the object. * * @return a String describing the object. * * @override Always This is the method used by the {@link log.swing.DefaultLogEntryTED} to render the log * entry's contents. */ public String toString() { return "Object logged: " + getLogDate(); } /** * Returns the date this entry was logged. * * @return The logging date and time. * * @override Never */ public Date getLogDate() { return m_dtLogDate; } }