|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.perforce.api.EventLog
This class controls an event log. A set number of log entries are kept in memory, but all log entries are sent to a log file.
Constructor Summary | |
EventLog()
Default, no-argument constructor. |
|
EventLog(String title)
Constructor that accepts the title for this. |
|
EventLog(String title,
String filename)
Constructor that sets the log title and ouput filename. |
Method Summary | |
static void |
commonLog(String event)
Logs an event to the common log. |
static void |
commonLog(String event,
String level)
Logs an event to the common log. |
static void |
commonLog(String event,
String level,
boolean encode)
Logs an event to the common log. |
String |
getFileName()
Returns the output file name. |
Enumeration |
getLog()
Returns an Enumeration that contains all the events in the log. |
int |
getSize()
Returns the size of the event log memory. |
String |
getTitle()
Gets the title of the log. |
void |
log(String event)
Logs an event to this log. |
void |
log(String event,
String level)
Logs an event to this log. |
void |
log(String event,
String level,
boolean encode)
Logs an event to this log. |
static void |
printLog(EventLog elog,
PrintWriter out,
String format)
Prints a log, using the specified format. |
static void |
printLog(PrintWriter out,
String format)
Prints this log, using the specified format. |
void |
setSize(int size)
Sets the size of the log. |
void |
setTitle(String title)
Sets the title for this log. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventLog()
Vector
public EventLog(String title)
title
- The title for this log.public EventLog(String title, String filename)
title
- The title for this log.filename
- Name for the output file.Method Detail |
public static void commonLog(String event)
event
- The event to be logged.public static void commonLog(String event, String level)
event
- The event to be logged.level
- Level for the logged event.public static void commonLog(String event, String level, boolean encode)
event
- The event to be logged.level
- Level for the logged event.encode
- Indicates that the output should be XML/HTML encoded.public String getFileName()
public Enumeration getLog()
public int getSize()
public String getTitle()
public void log(String event)
event
- The event to be logged.public void log(String event, String level)
event
- The event to be logged.level
- Level for the logged event.public void log(String event, String level, boolean encode)
event
- The event to be logged.level
- Level for the logged event.encode
- Indicates that the output should be XML/HTML encoded.public static void printLog(EventLog elog, PrintWriter out, String format)
elog
- EventLog
to print.out
- Print output.format
- Format to use.java.text.MessageFormat
public static void printLog(PrintWriter out, String format)
out
- Print output.format
- Format to use.java.text.MessageFormat
public void setSize(int size)
size
- The number of lines to keep in the log.public void setTitle(String title)
title
- The title of the log.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |