Class LoggerLayoutTTCC

Description

TTCC layout format consists of time, thread, category and nested diagnostic context information, hence the name.

Each of the four fields can be individually enabled or disabled. The time format depends on the DateFormat used.

If no dateFormat is specified it defaults to '%c'. See php http://www.php.net/date function for details.

Configurable parameters for this layout are:

An example how to use this layout:


      The above would print:
      02:28 [13714] INFO root - Hello World!

      • version: $Revision: 1302503 $
      • deprecated: LoggerLayout TTCC is deprecated and will be removed in a future release. Please use LoggerLayoutPattern instead.

      Located in /log4php/layouts/LoggerLayoutTTCC.php (line 54)

      LoggerConfigurable
         |
         --LoggerLayout
            |
            --LoggerLayoutTTCC
      Variable Summary
      Method Summary
      LoggerLayoutTTCC __construct ([string $dateFormat = ''])
      string format (LoggerLoggingEvent $event)
      boolean getContextPrinting ()
      string getDateFormat ()
      boolean getThreadPrinting ()
      void setCategoryPrefixing ( $categoryPrefixing)
      void setContextPrinting ( $contextPrinting)
      void setDateFormat ( $dateFormat)
      void setMicroSecondsPrinting ( $microSecondsPrinting)
      void setThreadPrinting ( $threadPrinting)
      Variables
      mixed $categoryPrefixing = true (line 58)
      • access: protected
      mixed $contextPrinting = true (line 59)
      • access: protected
      string $dateFormat = '%c' (line 65)
      mixed $microSecondsPrinting = true (line 60)
      • access: protected
      mixed $threadPrinting = true (line 57)
      • access: protected
      Methods
      Constructor __construct (line 73)

      Constructor

      LoggerLayoutTTCC __construct ([string $dateFormat = ''])
      • string $dateFormat: date format
      format (line 163)

      In addition to the level of the statement and message, the returned string includes time, thread, category.

      Time, thread, category are printed depending on options.

      • access: public
      string format (LoggerLoggingEvent $event)

      Redefinition of:
      LoggerLayout::format()
      Override this method to create your own layout format.
      getCategoryPrefixing (line 107)
      • return: Returns value of the CategoryPrefixing option.
      • access: public
      boolean getCategoryPrefixing ()
      getContextPrinting (line 123)
      • return: Returns value of the ContextPrinting option.
      • access: public
      boolean getContextPrinting ()
      getDateFormat (line 151)
      • access: public
      string getDateFormat ()
      getMicroSecondsPrinting (line 139)
      • return: Returns value of the MicroSecondsPrinting option.
      • access: public
      boolean getMicroSecondsPrinting ()
      getThreadPrinting (line 92)
      • return: Returns value of the ThreadPrinting option.
      • access: public
      boolean getThreadPrinting ()
      ignoresThrowable (line 198)
      • access: public
      void ignoresThrowable ()
      setCategoryPrefixing (line 100)

      The CategoryPrefixing option specifies whether Category name is part of log output or not. This is true by default.

      • access: public
      void setCategoryPrefixing ( $categoryPrefixing)
      • $categoryPrefixing
      setContextPrinting (line 116)

      The ContextPrinting option specifies log output will include the nested context information belonging to the current thread.

      This is true by default.

      • access: public
      void setContextPrinting ( $contextPrinting)
      • $contextPrinting
      setDateFormat (line 144)
      • access: public
      void setDateFormat ( $dateFormat)
      • $dateFormat
      setMicroSecondsPrinting (line 132)

      The MicroSecondsPrinting option specifies if microseconds infos should be printed at the end of timestamp.

      This is true by default.

      • access: public
      void setMicroSecondsPrinting ( $microSecondsPrinting)
      • $microSecondsPrinting
      setThreadPrinting (line 85)

      The ThreadPrinting option specifies whether the name of the current thread is part of log output or not. This is true by default.

      • access: public
      void setThreadPrinting ( $threadPrinting)
      • $threadPrinting

      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