/** * @param string $format The format of the message * @param Boolean $logContext If true add multiple rows containing Context information * @param Boolean $logExtra If true add multiple rows containing Extra information * @param integer $numberOfWords The number of words to show. */ public function __construct($format = null, $logContext = true, $logExtra = true, $numberOfWords = 2) { $this->format = $format ?: static::SIMPLE_FORMAT; $this->numberOfWords = $numberOfWords; $this->logContext = $logContext; $this->logExtra = $logExtra; parent::__construct(); }
public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) { parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); if (empty($format)) { if (php_sapi_name() == "cli") { $this->format = "[%datetime%] (cli) %level_name%: %message% %extra%\n"; } else { $this->format = "[%datetime%] (%extra.ip%:%user%) %extra.http_method% %extra.url%[%extra.referrer%]\n%message%\n%context%\n\n"; } } }
/** * @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($colorScheme = null, $format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) { // Store the Color Scheme if ($colorScheme instanceof ColorSchemeInterface) { $this->setColorScheme($colorScheme); } // Call Parent Constructor parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); }
/** * @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, $quoteReplacement = '^') { if ($format === null) { $format = self::SPLUNK_FORMAT; } // By default we just put the Unix timestamp to save Splunk processing costs; // We'll never actually search on this via Splunk, it has its own timestamp data. if ($dateFormat === null) { $dateFormat = 'U'; } $this->quoteReplacement = $quoteReplacement; parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); }
public function __construct() { parent::__construct(null, null, true); $this->normalizerFormatter = new NormalizerFormatter(); }
/** * CustomLineFormatter constructor. * * @param null|string $format * @param null|string $dateFormat * @param bool $allowInlineLineBreaks * @param bool $ignoreEmptyContextAndExtra * @param bool|true $editFormatted Switch ON/OFF full stack trace * @param string $traceStartString String you trace starts from */ public function __construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra, $editFormatted = true, $traceStartString = 'Stack trace') { $this->editStackTrace = $editFormatted; $this->traceStartString = $traceStartString; parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); }
/** * {@inheritdoc} */ public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = true) { parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); }
/** * {@inheritDoc} */ public function __construct($format = null, $dateFormat = null) { parent::__construct($format, $dateFormat); $this->initializeDomDocument(); }
/** * @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 * @param bool $includeStacktraces */ public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false, $includeStacktraces = false) { parent::__construct($format, $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); $this->includeStacktraces($includeStacktraces); }
/** * @param string $format [optional] The format of the message * @param string $dateFormat [optional] The format of the timestamp * @param bool $ignoreEmptyContextAndExtra [optional] */ public function __construct($format = null, $dateFormat = null, $ignoreEmptyContextAndExtra = false) { parent::__construct($format, $dateFormat, true, $ignoreEmptyContextAndExtra); }
/** * CustomLineFormatter constructor. * * @param null|string $format * @param null|string $dateFormat * @param bool $allowInlineLineBreaks * @param bool $ignoreEmptyContextAndExtra */ public function __construct() { $format = self::SIMPLE_FORMAT; $format = str_replace('%unique_id%', $this->getUniqueId(), $format); parent::__construct($format); }
/** * @param string|null $format * @param bool $allowInlineLineBreaks * @param bool $ignoreEmptyContextAndExtra * @param int $maxLength */ public function __construct($format = null, $allowInlineLineBreaks = true, $ignoreEmptyContextAndExtra = true, $maxLength = self::MAX_LENGTH_DEFAULT) { parent::__construct($format ?: static::FORMAT_DEFAULT, null, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra); $this->maxLength = $maxLength; }
public function __construct(SmsapiConfig $smsapiConfig) { $this->outputLength = $smsapiConfig->formatterOutputLength; parent::__construct($smsapiConfig->formatterFormat, $smsapiConfig->formatterDateFormat, $smsapiConfig->formatterAllowInlineLineBreaks, $smsapiConfig->formatterIgnoreEmptyContextAndExtra); }