Package com.sun.identity.log.handlers
Class DBFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- com.sun.identity.log.handlers.DBFormatter
-
public class DBFormatter extends Formatter
This Formatter provides support for formatting LogRecords that will help Database Logging.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 Summary
Constructors Constructor Description DBFormatter()CreatesDBFormatterobject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(LogRecord logRecord)Simply return the value from calling formatMessage.StringgetHead(Handler h)Returns the set of all fields converted into a COMMA seperated string.StringgetTail(Handler h)Returns a null string whenever called.-
Methods inherited from class java.util.logging.Formatter
formatMessage
-
-
-
-
Method Detail
-
getHead
public String getHead(Handler h)
Returns the set of all fields converted into a COMMA seperated string. A typical sql query for logging a record looks like this.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.
-
-