thinkmap.server
Class MessageLog

java.lang.Object
  extended by thinkmap.server.MessageLog
All Implemented Interfaces:
CustomJSONSerializable, JSONSerializable

public class MessageLog
extends Object
implements CustomJSONSerializable

Version:
$Revision $

Nested Class Summary
 class MessageLog.MessageIterator
           
 
Field Summary
static String[] errorLevelNames
           
protected  Throwable[] errors
           
protected  int[] levels
           
protected  int messageCount
           
protected  String[] messages
           
static int MSG_ERROR
          An error that is serious, but not fatal.
static int MSG_FATAL
          An error where the application can no longer function.
static int MSG_INFO
          An error that is primarily for informative purposes.
static int MSG_WARNING
          An error that is merely a warning and can usually be ignored
protected  long[] times
           
 
Constructor Summary
MessageLog(int size)
           
 
Method Summary
 void addMessage(int level, String message, Throwable t)
           
 int getMessageCount()
           
 MessageLog.MessageIterator getMessages()
           
 void reset()
           
protected  String stackTraceToString(Throwable t)
           
 void writeJSON(JSONWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_INFO

public static int MSG_INFO
An error that is primarily for informative purposes.


MSG_WARNING

public static int MSG_WARNING
An error that is merely a warning and can usually be ignored


MSG_ERROR

public static int MSG_ERROR
An error that is serious, but not fatal.


MSG_FATAL

public static int MSG_FATAL
An error where the application can no longer function.


errorLevelNames

public static final String[] errorLevelNames

errors

protected Throwable[] errors

times

protected long[] times

messages

protected String[] messages

levels

protected int[] levels

messageCount

protected int messageCount
Constructor Detail

MessageLog

public MessageLog(int size)
Method Detail

reset

public void reset()

getMessageCount

public int getMessageCount()

addMessage

public void addMessage(int level,
                       String message,
                       Throwable t)

writeJSON

public void writeJSON(JSONWriter writer)
Specified by:
writeJSON in interface CustomJSONSerializable

getMessages

public MessageLog.MessageIterator getMessages()

stackTraceToString

protected String stackTraceToString(Throwable t)


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.