org.aitools.programd.logging
Class ChatLogEvent

java.lang.Object
  extended by org.apache.log4j.spi.LoggingEvent
      extended by org.aitools.programd.logging.ChatLogEvent
All Implemented Interfaces:
java.io.Serializable

public class ChatLogEvent
extends org.apache.log4j.spi.LoggingEvent

A ChatLogEvent contains additional information about an exchange in a chat. Note that a ChatLogEvent must be logged using Category.callAppenders(LoggingEvent), not one of the wrapper methods like "info" nor the basic "log" method. This is due to a limitation with log4j (the provided logging methods will re-cast the event as a LoggingEvent and it won't be recognized by the chatlog-specific filters and layouts).

Since:
4.6
Author:
Noel Bush
See Also:
Serialized Form

Field Summary
private  java.lang.String botid
          The id of the bot.
private  java.lang.String input
          The client's input.
private static java.lang.String LOGGER_FQCN
          The fully qualified class name of the Logger class.
private  java.lang.String reply
          The bot's response.
private  java.lang.String userid
          The id of the user.
 
Fields inherited from class org.apache.log4j.spi.LoggingEvent
categoryName, fqnOfCategoryClass, level, timeStamp
 
Constructor Summary
ChatLogEvent(java.lang.String bot, java.lang.String user, java.lang.String in, java.lang.String out)
          Creates a new ChatLogEvent.
 
Method Summary
 java.lang.String getBotID()
           
 java.lang.String getInput()
           
 java.lang.String getReply()
           
 java.lang.String getUserID()
           
 
Methods inherited from class org.apache.log4j.spi.LoggingEvent
getFQNOfLoggerClass, getLevel, getLocationInformation, getLogger, getLoggerName, getMDC, getMDCCopy, getMessage, getNDC, getProperties, getProperty, getPropertyKeySet, getRenderedMessage, getStartTime, getThreadName, getThrowableInformation, getThrowableStrRep, getTimeStamp, locationInformationExists, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

private java.lang.String input
The client's input.


reply

private java.lang.String reply
The bot's response.


userid

private java.lang.String userid
The id of the user.


botid

private java.lang.String botid
The id of the bot.


LOGGER_FQCN

private static final java.lang.String LOGGER_FQCN
The fully qualified class name of the Logger class.

Constructor Detail

ChatLogEvent

public ChatLogEvent(java.lang.String bot,
                    java.lang.String user,
                    java.lang.String in,
                    java.lang.String out)
Creates a new ChatLogEvent.

Parameters:
bot - the botid with whom this exchange occurred
user - the userid with whom this exchange occurred
in - the input from the user
out - the reply from the bot
Method Detail

getBotID

public java.lang.String getBotID()
Returns:
the botid.

getUserID

public java.lang.String getUserID()
Returns:
the userid.

getInput

public java.lang.String getInput()
Returns:
the input.

getReply

public java.lang.String getReply()
Returns:
the reply.