public class FileLogger extends AbstractMessageLogger
It does not wrap the XML within the OLI XML.
These files are readable by DataShop's FileLogger application.
CLOSE_ROOT_NODE, ENCODING_ISO_8859_1, ENCODING_UTF8, INFO_TYPE, PROD_URL, QA_URL
Constructor and Description |
---|
FileLogger(java.io.PrintWriter outputStream,
java.lang.String encoding)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the output stream; this is required.
|
static FileLogger |
create(java.lang.String fileName)
Create the file logger given a file name.
|
static FileLogger |
create(java.lang.String fileName,
java.lang.String encoding)
Create the file logger given a file name.
|
boolean |
log(Message message)
Logs a message to the previously given file.
|
boolean |
log(Message message,
java.util.Date timeStamp)
Logs a message with a new time stamp.
|
boolean |
log(Message message,
java.lang.String timeString)
Logs a message with a new time stamp.
|
boolean |
log(java.lang.String authToken,
Message message)
Logs a message.
|
boolean |
log(java.lang.String authToken,
Message message,
java.util.Date timeStamp)
Logs a message with a new time stamp.
|
getCloseXml, getOpenXml, getOpenXmlSchemaType
public FileLogger(java.io.PrintWriter outputStream, java.lang.String encoding)
outputStream
- the output streamencoding
- the encoding to be indicated at the top of the XMLpublic static FileLogger create(java.lang.String fileName)
fileName
- the file namepublic static FileLogger create(java.lang.String fileName, java.lang.String encoding)
fileName
- the file nameencoding
- the encoding to be indicated at the top of the XMLpublic boolean log(Message message)
message
- the message to log to the filepublic boolean log(java.lang.String authToken, Message message)
authToken
- the authentication token needed for authenticated logging (OLI servers)message
- the message to logpublic boolean log(Message message, java.util.Date timeStamp)
message
- the message to logtimeStamp
- the new time stamp to usepublic boolean log(java.lang.String authToken, Message message, java.util.Date timeStamp)
authToken
- the authentication token needed for authenticated logging (OLI servers)message
- the message to logtimeStamp
- the new time stamp to usepublic boolean log(Message message, java.lang.String timeString)
message
- the message to logtimeString
- the new time stamp to usepublic void close()
Copyright (c) 2015 - Pittsburgh Science of Learning Center