Class RemoteFormatter


  • public class RemoteFormatter
    extends Formatter
    The formatter which prepares the xml string to be sent to a remote log service. This xml string conforms to the logDTD.xml file which is given below.
    
     <?XML version="1.0">
    
     <!--This DTD is used by Logging operation-->
     <!DOCTYPE logging [
    
     <!ELEMENT logRecWrite (log, logRecord*)>
     <!ELEMENT log>
     <!ATTLIST log
      logName          CDATA #REQUIRED
      sid              CDATA #REQUIRED
     >
     <!ELEMENT logRecord (level ,msg ,logType? , logInfo? ,parameters?)>
     <!ELEMENT level (#PCDATA)>
     <!ELEMENT recMsg (#PCDATA)>
     <!ELEMENT logType (#PCDATA)>
     <!ELEMENT logInfoMap (logInfo*)>
     <!ELEMENT logInfo (key ,infoValue)>
     <!ELEMENT key (#PCDATA)>
     <!ELEMENT infoValue (#PCDATA)>
     <!ELEMENT parameters (parameter*)>
     <!ELEMENT parameter (index ,paramValue)>
     <!ELEMENT index (#PCDATA)>
     <!ELEMENT paramValue (#PCDATA)>
     ]
     
    • Constructor Detail

      • RemoteFormatter

        public RemoteFormatter()
    • Method Detail

      • format

        public String format​(LogRecord logRecord)
        The method which does the actual formatting of the LogRecord.
        Specified by:
        format in class Formatter
        Parameters:
        logRecord - The logRecord to be formatted
        Returns:
        The string formed by formatting the logRecord