public class DBFormatter extends Formatter
Typically this Formatter will be associated with a DBHandler (a handler meant to handle Database logging). DBFormatter takes a LogRecord and converts it to a Formatted string which DBHandler can understand.
Constructor and Description |
---|
DBFormatter()
Creates
DBFormatter object |
Modifier and Type | Method and Description |
---|---|
String |
format(LogRecord logRecord)
Simply return the value from calling formatMessage.
|
String |
getHead(Handler h)
Returns the set of all fields converted into a COMMA seperated
string.
|
String |
getTail(Handler h)
Returns a null string whenever called.
|
formatMessage
public String getHead(Handler h)
insert into table "amSSO_access" (time, data, loginid, domain, level, ipAddress, hostname) values('10:10:10', '10th June, 2002', ..., ..., ...)
The getHead method returns back the set of all fields converted into a COMMA seperated string. It is the duty of the formatter to fetch the all field set from the LogManager and convert into a COMMA seperated string. By doing this the handler can be kept independent of the all field and selected field set.
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.