public class BaseFileHandler
extends java.util.logging.FileHandler
Modifier | Constructor and Description |
---|---|
protected |
BaseFileHandler(java.lang.String pattern,
int limit,
int count,
boolean append,
int bufSize)
Constructor to create a file based handler
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
addRecordToList(java.util.logging.LogRecord record,
java.lang.String ecid)
Add a record to the LinkedList identified by ECID.
|
void |
flush()
Flush the map entry identified by current ecid from internal logging
buffer.
|
protected java.lang.String |
getLeastAccessedECID()
Return the least accessed ECID.
|
protected boolean |
isBufferFull()
Is buffer mLogRecordBuffer full(too many requests in the buffer)?
|
protected boolean |
isRecordListTooLong(java.lang.String ecid)
Does the length of log records exceend LOGRECORDS_PER_LINE?
|
protected void |
printList(java.lang.String ecid,
java.util.LinkedList recordList)
Print the log record list based on ecid
|
protected java.util.LinkedList |
removeList(java.lang.String ecid)
Remove the linked list from buffer based on ECID
|
protected void |
reportError(java.lang.String msg,
java.lang.Exception ex,
int code)
This is the standard logging error reporting mechanism used by JUL handlers.
|
isLoggable, setEncoding, setOutputStream
protected BaseFileHandler(java.lang.String pattern, int limit, int count, boolean append, int bufSize) throws java.io.IOException, java.lang.SecurityException
pattern
- log file name patternlimit
- log file size limitcount
- number of log filesappend
- true
means log contents being appended to the
existing file. false
means the existing log file is
truncated.bufSize
- the size of internal buffer to hold specified number of
request log line. Each request normally generates only one line
performanc logging entry and business analytics entry.java.io.IOException
java.lang.SecurityException
public void flush()
flush
in class java.util.logging.StreamHandler
protected java.lang.String addRecordToList(java.util.logging.LogRecord record, java.lang.String ecid)
protected boolean isBufferFull()
protected boolean isRecordListTooLong(java.lang.String ecid)
protected java.lang.String getLeastAccessedECID()
protected java.util.LinkedList removeList(java.lang.String ecid)
protected void printList(java.lang.String ecid, java.util.LinkedList recordList)
protected void reportError(java.lang.String msg, java.lang.Exception ex, int code)
reportError
in class java.util.logging.Handler