org.norther.tammi.acorn.logger.log
Class LogEntry

java.lang.Object
  extended by java.util.logging.LogRecord
      extended by org.norther.tammi.acorn.logger.log.LogEntry
All Implemented Interfaces:
Serializable

public class LogEntry
extends LogRecord

A extended log record.

See Also:
Serialized Form

Constructor Summary
LogEntry()
          Constructs a new entry.
LogEntry(String msg, Object arg, Throwable cause)
          Constructs a new entry with parameters.
 
Method Summary
 Object getContext()
          Gets the context.
 String getDate()
          Gets the formatted date.
 int getIntLevel()
          Gets the int level.
 Object getLogger()
          Gets the native logger.
static String getTimeZoneId()
          Gets the default time zone.
 boolean isStackTrace()
          Checks the stack trace.
 void print()
          Prints a system error message.
 void setContext(Object ctx)
          Sets the context.
 void setIntLevel(int l)
          Sets the int level.
 void setLogger(Object log)
          Sets the native logger.
 void setStackTrace(boolean flag)
          Sets the stack trace.
static void setTimeZoneId(String zone)
          Sets the default time zone.
 String toString()
          Returns the string representation of this entry.
static String toString(Object object)
          Default log output for an object.
static String toString(Object object, boolean encode)
          Optional URL encoded output for an object.
 
Methods inherited from class java.util.logging.LogRecord
getLevel, getLoggerName, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, getSourceClassName, getSourceMethodName, getThreadID, getThrown, setLevel, setLoggerName, setMessage, setMillis, setParameters, setResourceBundle, setResourceBundleName, setSequenceNumber, setSourceClassName, setSourceMethodName, setThreadID, setThrown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEntry

public LogEntry()
Constructs a new entry.


LogEntry

public LogEntry(String msg,
                Object arg,
                Throwable cause)
Constructs a new entry with parameters.

Parameters:
msg - the message.
arg - the argument(s).
cause - the cause.
Method Detail

getTimeZoneId

public static String getTimeZoneId()
Gets the default time zone.

Returns:
the default time zone of log entries.

setTimeZoneId

public static void setTimeZoneId(String zone)
Sets the default time zone.

Parameters:
zone - the default time zone of log entries.

toString

public static String toString(Object object)
Default log output for an object.

Parameters:
object - an object.
Returns:
an output string.

toString

public static String toString(Object object,
                              boolean encode)
Optional URL encoded output for an object.

Parameters:
object - an object.
encode - use URL encoding.
Returns:
an output string.

print

public void print()
Prints a system error message.


getDate

public String getDate()
Gets the formatted date.

Returns:
the formatted date.

getIntLevel

public int getIntLevel()
Gets the int level.

Returns:
the int level.

setIntLevel

public void setIntLevel(int l)
Sets the int level.

Parameters:
l - the int level.

isStackTrace

public boolean isStackTrace()
Checks the stack trace.

Returns:
true for a trace, false otherwise.

setStackTrace

public void setStackTrace(boolean flag)
Sets the stack trace.

Parameters:
flag - true for a trace, false otherwise.

getLogger

public Object getLogger()
Gets the native logger.

Returns:
the native logger.

setLogger

public void setLogger(Object log)
Sets the native logger.

Parameters:
log - the native logger.

getContext

public Object getContext()
Gets the context.

Returns:
the contxt.

setContext

public void setContext(Object ctx)
Sets the context.

Parameters:
ctx - the context.

toString

public String toString()
Returns the string representation of this entry.

Overrides:
toString in class Object
Returns:
the entry as a string.


Copyright © 2004 The Norther Organization. All rights reserved.