Trait LogTrait

A trait providing an object short-cut method to logging.

Direct Users

Indirect Users

Namespace: Cake\Log
Location: Log/LogTrait.php

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()source public

log( mixed $msg , integer|string $level Cake\Log\LogLevel::ERROR , string|array $context [] )

Convenience method to write a message to Log. See Log::write() for more information on writing to logs.

Parameters

mixed $msg
Log message.
integer|string $level optional Cake\Log\LogLevel::ERROR
Error level.
string|array $context optional []
Additional log data relevant to this message.

Returns

boolean
Success of log write.

© 2005–2017 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/3.4/class-Cake.Log.LogTrait.html