org.alicebot.server.core.logging
Class XMLLog

java.lang.Object
  extended by org.alicebot.server.core.logging.XMLLog

public class XMLLog
extends java.lang.Object

Provides a simplistic XML file writing facility.

Version:
4.1.3
Author:
Noel Bush

Constructor Summary
XMLLog()
           
 
Method Summary
static XMLResourceSpec getChatlogSpecClone()
          Returns a generic chat log spec that can be customized.
static void log(java.lang.String message, XMLResourceSpec spec)
          Writes a message to an XML log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLLog

public XMLLog()
Method Detail

getChatlogSpecClone

public static XMLResourceSpec getChatlogSpecClone()
Returns a generic chat log spec that can be customized.

Returns:
a generic chat log spec that can be customized

log

public static void log(java.lang.String message,
                       XMLResourceSpec spec)
Writes a message to an XML log file. If the number of entries has exceeded ROLLOVER, the file will be renamed and a new file created. Note that the approach currently used has an important defect: it only counts entries during the runtime of the bot; it will not count entries in an existing log file, so if the bot is restarted many times and ROLLOVER is rather large, actual logfiles may exceed the limit significantly.

Parameters:
message - the text of the log event
spec - the log spec