Trait LogTrait

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

Direct Known Users

Cake\Console\Shell, Cake\Controller\Component, Cake\Controller\Controller, Cake\View\View

Indirect Known Users

Cake\Controller\Component\AuthComponent, Cake\Controller\Component\CookieComponent, Cake\Shell\I18nShell, Cake\Shell\OrmCacheShell, Cake\Shell\PluginShell, Cake\Shell\RoutesShell, Cake\Shell\ServerShell, Cake\Shell\Task\AssetsTask, Cake\Shell\Task\CommandTask, Cake\Shell\Task\ExtractTask, Cake\Shell\Task\LoadTask, Cake\Shell\Task\UnloadTask, Cake\Controller\Component\CsrfComponent, Cake\View\AjaxView, Cake\View\JsonView, Cake\View\SerializedView, Cake\View\XmlView, Cake\Controller\Component\FlashComponent, Cake\Controller\Component\PaginatorComponent, Cake\Controller\Component\RequestHandlerComponent, Cake\Controller\Component\SecurityComponent, Cake\Controller\ErrorController, Cake\Shell\CommandListShell, Cake\Shell\CompletionShell
Namespace: Cake\Log
Located at Log/LogTrait.php

Method Detail

logsource 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–2016 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.
http://api.cakephp.org/3.1/class-Cake.Log.LogTrait.html