Skip to content

Commit

Permalink
Updating file headers.
Browse files Browse the repository at this point in the history
Removing Object::$_log.  CakeLog is now called statically.  Saving an instance is not longer necessary or desired.
  • Loading branch information
markstory committed Nov 6, 2009
1 parent c238d4d commit 5506af8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
5 changes: 2 additions & 3 deletions cake/libs/log/file_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
Expand All @@ -23,8 +22,8 @@
/**
* File Storage stream for Logging
*
* @package cake
* @subpackage cake.cake.libs.log
* @package cake
* @subpackage cake.cake.libs.log
*/
class FileLog {

Expand Down
27 changes: 5 additions & 22 deletions cake/libs/object.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php
/* SVN FILE: $Id$ */

/**
* Object class, allowing __construct and __destruct in PHP4.
*
Expand All @@ -10,20 +8,16 @@
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.libs
* @since CakePHP(tm) v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/

Expand All @@ -33,19 +27,11 @@
* Also includes methods for logging and the special method RequestAction,
* to call other Controllers' Actions from anywhere.
*
* @package cake
* @subpackage cake.cake.libs
* @package cake
* @subpackage cake.cake.libs
*/
class Object {

/**
* Log object
*
* @var CakeLog
* @access protected
*/
var $_log = null;

/**
* A hack to support __construct() on PHP 4
* Hint: descendant classes have no PHP4 class_name() constructors,
Expand Down Expand Up @@ -160,13 +146,10 @@ function log($msg, $type = LOG_ERROR) {
if (!class_exists('CakeLog')) {
require LIBS . 'cake_log.php';
}
if (is_null($this->_log)) {
$this->_log = new CakeLog();
}
if (!is_string($msg)) {
$msg = print_r($msg, true);
}
return $this->_log->write($type, $msg);
return CakeLog::write($type, $msg);
}

/**
Expand Down

0 comments on commit 5506af8

Please sign in to comment.