Class LoggerLayoutHtml

Description

This layout outputs events in a HTML table.

Configurable parameters for this layout are:

  • title
  • locationInfo
An example for this layout:


    The corresponding XML file:

      The above will print a HTML table that looks, converted back to plain text, like the following:

          Log session start time Wed Sep 9 00:11:30 2009
      
          Time Thread Level Category   Message
          0    8318   INFO  root       Hello World!

      • version: $Revision: 1379731 $

      Located in /log4php/layouts/LoggerLayoutHtml.php (line 49)

      LoggerConfigurable
         |
         --LoggerLayout
            |
            --LoggerLayoutHtml
      Variable Summary
      boolean $locationInfo
      string $title
      Method Summary
      string format (LoggerLoggingEvent $event)
      string getContentType ()
      string getFooter ()
      string getHeader ()
      void getLocationInfo ()
      string getTitle ()
      void setLocationInfo ( $flag)
      void setTitle ( $title)
      Variables
      boolean $locationInfo = false (line 62)

      The LocationInfo option takes a boolean value. By

      default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

      <p>If you are embedding this layout within a LoggerAppenderMail or a LoggerAppenderMailEvent then make sure to set the LocationInfo option of that appender as well.

      • access: protected
      string $title = "Log4php Log Messages" (line 70)

      The Title option takes a String value. This option sets the document title of the generated HTML document.

      Defaults to 'Log4php Log Messages'.

      • access: protected
      Methods
      format (line 121)
      • access: public
      string format (LoggerLoggingEvent $event)

      Redefinition of:
      LoggerLayout::format()
      Override this method to create your own layout format.
      getContentType (line 113)
      • return: Returns the content type output by this layout, i.e "text/html".
      • access: public
      string getContentType ()

      Redefinition of:
      LoggerLayout::getContentType()
      Returns the content type output by this layout.
      getFooter (line 207)
      • return: Returns the appropriate HTML footers.
      • access: public
      string getFooter ()

      Redefinition of:
      LoggerLayout::getFooter()
      Returns the footer for the layout format.
      getHeader (line 173)
      • return: Returns appropriate HTML headers.
      • access: public
      string getHeader ()

      Redefinition of:
      LoggerLayout::getHeader()
      Returns the header for the layout format.
      getLocationInfo (line 90)

      Returns the current value of the LocationInfo option.

      • access: public
      void getLocationInfo ()
      getTitle (line 106)
      • return: Returns the current value of the Title option.
      • access: public
      string getTitle ()
      setLocationInfo (line 83)

      The LocationInfo option takes a boolean value. By

      default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

      <p>If you are embedding this layout within a LoggerAppenderMail or a LoggerAppenderMailEvent then make sure to set the LocationInfo option of that appender as well.

      • access: public
      void setLocationInfo ( $flag)
      • $flag
      setTitle (line 99)

      The Title option takes a String value. This option sets the document title of the generated HTML document.

      Defaults to 'Log4php Log Messages'.

      • access: public
      void setTitle ( $title)
      • $title

      Inherited Methods

      Inherited From LoggerLayout

      LoggerLayout::activateOptions()
      LoggerLayout::format()
      LoggerLayout::getContentType()
      LoggerLayout::getFooter()
      LoggerLayout::getHeader()
      LoggerLayout::warn()

      Inherited From LoggerConfigurable

      LoggerConfigurable::setBoolean()
      LoggerConfigurable::setFileSize()
      LoggerConfigurable::setInteger()
      LoggerConfigurable::setLevel()
      LoggerConfigurable::setNumeric()
      LoggerConfigurable::setPositiveInteger()
      LoggerConfigurable::setString()
      LoggerConfigurable::warn()

      Documentation generated on Tue, 12 Mar 2024 14:04:53 +0900 by phpDocumentor 1.4.4