Skip to content

Commit

Permalink
Remove mentions of Object.
Browse files Browse the repository at this point in the history
Remove references to Object and the methods it provides.

Fixes #1278
  • Loading branch information
markstory committed Apr 22, 2014
1 parent 1dd49ec commit af47db7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
8 changes: 5 additions & 3 deletions en/appendices/3-0-migration-guide.rst
Expand Up @@ -161,9 +161,11 @@ The config reader classes have been renamed:
Object
------

- ``Object::log()`` was removed from Object and added to the :php:trait:`Cake\\Log\\LogTrait` class.
- ``Object::requestAction()`` was removed from Object and added to the
:php:trait:`Cake\\Routing\\RequestActionTrait`.
The ``Object`` class has been removed. It formerly contained a grab bag of
methods that were used in various places across the framework. The most useful
of these methods have been extracted into traits. You can use the
:php:trait:`Cake\\Log\\LogTrait` to access the ``log()`` method. The
:php:trait:`Cake\\Routing\\RequestActionTrait` provides ``requestAction()``.

Console
=======
Expand Down
4 changes: 2 additions & 2 deletions en/core-libraries/logging.rst
Expand Up @@ -219,10 +219,10 @@ is to use the static :php:meth:`Cake\\Log\\Log::write()` method::
Log::write('debug', 'Something did not work');

The second is to use the log() shortcut function available on any
class that extends ``Object``. Calling log() will internally call
using the ``LogTrait`` Calling log() will internally call
``Log::write()``::

// Executing this inside a CakePHP class:
// Executing this inside a class using LogTrait
$this->log("Something did not work!", 'debug');

All configured log streams are written to sequentially each time
Expand Down
14 changes: 7 additions & 7 deletions en/development/debugging.rst
Expand Up @@ -162,22 +162,22 @@ Using Logging to Debug
======================

Logging messages is another good way to debug applications, and you can use
:php:class:`CakeLog` to do logging in your application. All objects that
extend :php:class:`Object` have an instance method `log()` which can be used
:php:class:`Cake\\Log\\Log` to do logging in your application. All objects that
use ``LogTrait`` have an instance method `log()` which can be used
to log messages::

$this->log('Got here', 'debug');

The above would write ``Got here`` into the debug log. You can use log entries
to help debug methods that involve redirects or complicated loops. You can also
use :php:meth:`CakeLog::write()` to write log messages. This method can be called
use :php:meth:`Cake\\Log\\Log::write()` to write log messages. This method can be called
statically anywhere in your application one CakeLog has been loaded::

// in app/Config/bootstrap.php
App::uses('CakeLog', 'Log');
// At the top of the file you want to log in.
use Cake\Log\Log;

// Anywhere in your application
CakeLog::write('debug', 'Got here');
// Anywhere that Log has been imported.
Log::debug('Got here');

Debug Kit
=========
Expand Down

0 comments on commit af47db7

Please sign in to comment.