mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
fixing output for logs and accept log level from configs
This commit is contained in:
parent
9e0ff5ad88
commit
9300f094a5
1 changed files with 5 additions and 1 deletions
|
@ -943,7 +943,11 @@ class CakeEmail {
|
|||
}
|
||||
$contents = $this->transportClass()->send($this);
|
||||
if (isset($this->_config['log']) && $this->_config['log']) {
|
||||
CakeLog::write(LOG_DEBUG, '\nHeaders:\n' . $contents['headers'] . 'Message:\n' . $contents['message']);
|
||||
$level = LOG_DEBUG;
|
||||
if ($this->_config['log'] !== true) {
|
||||
$level = $this->_config['log'];
|
||||
}
|
||||
CakeLog::write($level, PHP_EOL . $contents['headers'] . PHP_EOL . $contents['message']);
|
||||
}
|
||||
return $contents;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue