Package com.pnfsoftware.jeb.client
Class ErrorLogGenerator
java.lang.Object
com.pnfsoftware.jeb.client.ErrorLogGenerator
An error log generator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a new record.Add a new record.Dump the unencoded log to a folder on disk.Dump the log to disk.static String
getLog()
Generate an unencoded string representation of this entire error log.getLog
(Collection<String> keys, boolean encode) Generate a string representation of this error log.void
boolean
removeRecord
(String key) boolean
Add a new or replace an existing record.toString()
-
Field Details
-
ERRORLOG_VERSION
public static final int ERRORLOG_VERSION- See Also:
-
KEY_URLENCODED_THREADS
- See Also:
-
-
Constructor Details
-
ErrorLogGenerator
-
-
Method Details
-
generateUrlencodedThreadsRecordValue
-
recordEnginesInformation
-
getRecords
-
addRecord
Add a new record. If a record with a similar key exists, a new key will be generated to insert this record without overwriting the pre-existing value.- Parameters:
key
- non-null record keyvalue
- record value- Returns:
- the actual key that was used to register the record
-
addRecord
Add a new record. If a record with a similar key exists, the existing record will not be replaced. It may be added using a different key, or it may not be added at all.- Parameters:
key
- non-null record keyvalue
- record valuegenerateNewKeyIfExists
-- Returns:
- the actual key that was used to register the record, or null if the record was not inserted
-
setRecord
Add a new or replace an existing record.- Parameters:
key
-value
-- Returns:
- true if the key did not exist, false if a record having a same key was replaced
-
removeRecord
- Parameters:
key
-- Returns:
- true if the record was removed
-
getThrowable
-
getLog
Generate an unencoded string representation of this entire error log.- Returns:
- the string representation of this log
-
getLog
Generate a string representation of this error log.- Parameters:
keys
- the keys of records to be generated; use null to mean all; if an ordered collection is provided, the order is maintainedencode
- true to URL-encode the keys and values- Returns:
- the string representation of this log
-
toString
-
dumpTo
Dump the unencoded log to a folder on disk.- Parameters:
folder
-- Returns:
-
dumpTo
Dump the log to disk.- Parameters:
folder
-filename
- optional; if null, will auto-generate a filename (jeb_errorlog_...
)encode
- true to URL-encode the keys and values- Returns:
-