On this page
Trait LogTrait
A trait providing an object short-cut method to logging.
Namespace: Cake\Log
Method Summary
log() public
Convenience method to write a message to Log. See Log::write() for more information on writing to logs.
Method Detail
log() public
log(string $message, string|int $level = LogLevel::ERROR, array|string $context = []): bool
Convenience method to write a message to Log. See Log::write() for more information on writing to logs.
Parameters
string
$message-
Log message.
string|int
$level optional-
Error level.
array|string
$context optional-
Additional log data relevant to this message.
Returns
bool
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/trait-Cake.Log.LogTrait.html