Class LoggerLayoutTTCC
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 PHP_MANUAL#date function for details.
Configurable parameters for this layout are:
- LoggerLayoutTTCC::$threadPrinting (true|false) enable/disable pid reporting.
- LoggerLayoutTTCC::$categoryPrefixing (true|false) enable/disable logger category reporting.
- LoggerLayoutTTCC::$contextPrinting (true|false) enable/disable NDC reporting.
- LoggerLayoutTTCC::$microSecondsPrinting (true|false) enable/disable micro seconds reporting in timestamp.
- LoggerLayoutTTCC::$dateFormat (string) set date format. See php PHP_MANUAL#date function for details.
An example how to use this layout:
{@example ../../examples/php/layout_ttcc.php 19}
{@example ../../examples/resources/layout_ttcc.properties 18}
The above would print:
02:28 [13714] INFO root - Hello World!
- LoggerConfigurable
-
LoggerLayout
-
LoggerLayoutTTCC
Deprecated:
LoggerLayout TTCC is deprecated and will be removed in a future release. Please use LoggerLayoutPattern instead.
Version: $Revision: 1302503 $
Located at core/log4php/layouts/LoggerLayoutTTCC.php
public
|
|
public
|
#
setThreadPrinting( $threadPrinting )
The ThreadPrinting option specifies whether the name of the current thread is part of log output or not. This is true by default. |
public
boolean
|
|
public
|
#
setCategoryPrefixing( $categoryPrefixing )
The CategoryPrefixing option specifies whether Category name is part of log output or not. This is true by default. |
public
boolean
|
|
public
|
#
setContextPrinting( $contextPrinting )
The ContextPrinting option specifies log output will include the nested context information belonging to the current thread. This is true by default. |
public
boolean
|
|
public
|
#
setMicroSecondsPrinting( $microSecondsPrinting )
The MicroSecondsPrinting option specifies if microseconds infos should be printed at the end of timestamp. This is true by default. |
public
boolean
|
|
public
|
|
public
string
|
|
public
string
|
#
format(
In addition to the level of the statement and message, the returned string includes time, thread, category. < p>Time, thread, category are printed depending on options. |
public
|
activateOptions(),
getContentType(),
getFooter(),
getHeader(),
warn()
|
setBoolean(),
setFileSize(),
setInteger(),
setLevel(),
setNumeric(),
setPositiveInteger(),
setString()
|
protected
boolean
|
$threadPrinting
|
#
true
|
protected
boolean
|
$categoryPrefixing
|
#
true
|
protected
boolean
|
$contextPrinting
|
#
true
|
protected
boolean
|
$microSecondsPrinting
|
#
true
|
protected
string
|
$dateFormat
date format. See PHP_MANUAL#strftime for details |
#
'%c'
|