/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Log/Formatter
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Log/Formatter/DefaultFormatter.php (1671B)
*/
protected $_defaultConfig = [
'dateFormat' => 'Y-m-d H:i:s',
'includeTags' => false,
'includeDate' => true,
];
/**
* @param array
$config Formatter config
*/
public function __construct(array $config = [])
{
$this->setConfig($config);
}
/**
* @inheritDoc
*/
public function format($level, string $message, array $context = []): string
{
if ($this->_config['includeDate']) {
$message = sprintf('%s %s: %s', (new DateTime())->format($this->_config['dateFormat']), $level, $message);
} else {
$message = sprintf('%s: %s', $level, $message);
}
if ($this->_config['includeTags']) {
$message = sprintf('<%s>%s%s>', $level, $message, $level);
}
return $message;
}
}