Class HpelJsonFormatter
- java.lang.Object
-
- com.ibm.websphere.logging.hpel.reader.HpelFormatter
-
- com.ibm.websphere.logging.hpel.reader.HpelPlainFormatter
-
- com.ibm.websphere.logging.hpel.reader.HpelJsonFormatter
-
public class HpelJsonFormatter extends HpelPlainFormatter
-
-
Field Summary
-
Fields inherited from class com.ibm.websphere.logging.hpel.reader.HpelFormatter
FORMAT_ADVANCED, FORMAT_BASIC, FORMAT_CBE101, FORMAT_JSON
-
-
Constructor Summary
Constructors Constructor Description HpelJsonFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatRecord(RepositoryLogRecord record, java.util.Locale locale)Formats a RepositoryLogRecord using the locale specified.java.lang.StringgetFooter()Gets the formatter's footer.java.lang.String[]getHeader()Gets the file header information.voidsetStartDatetime(long datetime)-
Methods inherited from class com.ibm.websphere.logging.hpel.reader.HpelFormatter
addCustomLevel, addCustomLevel, convertParameters, formatMessage, formatRecord, formatRecord, getFormatter, getHeaderProps, getLineSeparator, getLocale, getTimeZoneID, setCustomHeader, setDateFormat, setHeaderProps, setLineSeparator, setTimeZoneID, translateMessage
-
-
-
-
Method Detail
-
formatRecord
public java.lang.String formatRecord(RepositoryLogRecord record, java.util.Locale locale)
Description copied from class:HpelFormatterFormats a RepositoryLogRecord using the locale specified.- Specified by:
formatRecordin classHpelFormatter- Parameters:
record- the RepositoryLogRecord to be formattedlocale- the locale to use when formatting this record.- Returns:
- the formatted RepositoryLogRecord as string output.
-
getFooter
public java.lang.String getFooter()
Description copied from class:HpelFormatterGets the formatter's footer. This method will return an empty string if the formatter does not have a footer as part of the formatter's format style.- Specified by:
getFooterin classHpelFormatter- Returns:
- the footer as a string
-
getHeader
public java.lang.String[] getHeader()
Description copied from class:HpelPlainFormatterGets the file header information. Implementations of the HpelPlainFormatter class will have a non-XML-based header.- Overrides:
getHeaderin classHpelPlainFormatter- Returns:
- the formatter's header as a String
-
setStartDatetime
public void setStartDatetime(long datetime)
- Overrides:
setStartDatetimein classHpelFormatter
-
-