PHP Class Liuggio\StatsdClient\Monolog\Formatter\StatsDFormatter

This is especially useful for logging to files
Author: Jordi Boggiano ([email protected])
Author: Christophe Coevoet ([email protected])
Author: Giulio De Donato ([email protected])
Inheritance: extends Monolog\Formatter\LineFormatter
Datei anzeigen Open project: liuggio/statsd-php-client Class Usage Examples

Protected Properties

Property Type Description
$logContext
$logExtra
$numberOfWords

Public Methods

Method Description
__construct ( string $format = null, boolean $logContext = true, boolean $logExtra = true, integer $numberOfWords = 2 )
format ( array $record )
formatBatch ( array $records )
getFirstWords ( string $message ) : string This function converts a long message into a string with the first N-words.

Method Details

__construct() public method

public __construct ( string $format = null, boolean $logContext = true, boolean $logExtra = true, integer $numberOfWords = 2 )
$format string The format of the message
$logContext boolean If true add multiple rows containing Context information
$logExtra boolean If true add multiple rows containing Extra information
$numberOfWords integer The number of words to show.

format() public method

public format ( array $record )
$record array

formatBatch() public method

public formatBatch ( array $records )
$records array

getFirstWords() public method

eg. from: "Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener" to: "Notified event"
public getFirstWords ( string $message ) : string
$message string The message to shortify.
return string

Property Details

$logContext protected_oe property

protected $logContext

$logExtra protected_oe property

protected $logExtra

$numberOfWords protected_oe property

protected $numberOfWords