本文整理匯總了PHP中Monolog\Formatter\NormalizerFormatter::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP NormalizerFormatter::__construct方法的具體用法?PHP NormalizerFormatter::__construct怎麽用?PHP NormalizerFormatter::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Monolog\Formatter\NormalizerFormatter
的用法示例。
在下文中一共展示了NormalizerFormatter::__construct方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param string $format The format of the message
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
* @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries
* @param bool $ignoreEmptyContextAndExtra
*/
public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false)
{
$this->format = $format ?: static::SIMPLE_FORMAT;
$this->allowInlineLineBreaks = $allowInlineLineBreaks;
$this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra;
parent::__construct($dateFormat);
}
示例2: __construct
/**
* @param string $index Elastic Search index name
* @param string $type Elastic Search document type
*/
public function __construct($index, $type)
{
// elasticsearch requires a ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\\TH:i:s.uP');
$this->index = $index;
$this->type = $type;
}
示例3: __construct
public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_')
{
parent::__construct('U.u');
$this->systemName = $systemName ?: gethostname();
$this->extraPrefix = $extraPrefix;
$this->contextPrefix = $contextPrefix;
}
示例4: __construct
/**
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format.
* @param array $labeling Associative array of a Monolog record to a LTSV record mapping.
* @param bool $includeContext Whether to include context fields in a LTSV record.
* @param bool $includeExtra Whether to include extra fields in a LTSV record.
* @param array $labelReplacement Rule of replacement for LTSV labels.
* @param array $valueReplacement Rule of replacement for LTSV values.
*/
public function __construct($dateFormat = null, array $labeling = array('datetime' => 'time', 'level_name' => 'level', 'message' => 'message'), $includeContext = true, $includeExtra = true, array $labelReplacement = array("\r" => '', "\n" => '', "\t" => '', ':' => ''), array $valueReplacement = array("\r" => '\\r', "\n" => '\\n', "\t" => '\\t'))
{
parent::__construct($dateFormat);
$this->labeling = $labeling;
$this->includeContext = $includeContext;
$this->includeExtra = $includeExtra;
$this->labelReplacement = $labelReplacement;
$this->valueReplacement = $valueReplacement;
}
示例5: __construct
/**
* @param string $applicationName the application that sends the data, used as the "type" field of logstash
* @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine
* @param string $extraPrefix prefix for extra keys inside logstash "fields"
* @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_
*/
public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_')
{
// logstash requires a ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\\TH:i:sP');
$this->systemName = $systemName ?: gethostname();
$this->applicationName = $applicationName;
$this->extraPrefix = $extraPrefix;
$this->contextPrefix = $contextPrefix;
}
示例6: __construct
/**
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
*/
public function __construct($dateFormat = null)
{
parent::__construct($dateFormat);
}
示例7: __construct
/**
* @param string $index Elastic Search index name
* @param string $type Elastic Search document type
*/
public function __construct($index, $type)
{
parent::__construct(\DateTime::ISO8601);
$this->index = $index;
$this->type = $type;
}
示例8: __construct
public function __construct()
{
parent::__construct('c');
}
示例9: __construct
/**
* @param string $format The format of the message
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
*/
public function __construct($format = null, $dateFormat = null)
{
$this->format = $format ?: static::SIMPLE_FORMAT;
parent::__construct($dateFormat);
}
示例10: __construct
/**
* @param string $format The format of the message
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
* @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries
*/
public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false)
{
$this->format = $format ?: static::SIMPLE_FORMAT;
$this->allowInlineLineBreaks = $allowInlineLineBreaks;
parent::__construct($dateFormat);
}