* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Log.php 24703 2012-03-29 09:52:39Z andries $
* @category Zend
* @package Zend_Log
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Log.php 24703 2012-03-29 09:52:39Z andries $
*/
class Zend_Log
/**
* @var array of Zend_Log_Writer_Abstract
/**
* @var array of Zend_Log_Filter_Interface
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Log.php 24607 2012-01-16 16:45:49Z xerkus $
/**
* Resource for initializing logger
* @subpackage Resource
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*/
class Zend_Application_Resource_Log
/**
* @var Zend_Log
*/
protected $_log;
*
* @return Zend_Log
* @subpackage Zend_Translate_Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage Zend_Translate_Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* 'locale' => the actual set locale to use
* 'log' => a instance of Zend_Log where logs are written to
* 'logMessage' => message to be logged
if ((array_key_exists('log', $options)) && !($options['log'] instanceof Zend_Log)) {
require_once 'Zend/Translate/Exception.php';
!isset($this->_options[$key])) {
if (($key == 'log') && !($option instanceof Zend_Log)) {
require_once 'Zend/Translate/Exception.php';
throw new Zend_Translate_Exception('Instance of Zend_Log expected for option log');
if (!$this->_options['disableNotices']) {
if ($this->_options['log']) {
* @subpackage Protocol
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage Protocol
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/**
* Set the maximum log size
*
* @param integer $maximumLog Maximum log size
*/
public function setMaximumLog($maximumLog)
{
$this->_maximumLog = (int) $maximumLog;
/**
* Get the maximum log size
*
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log */
require_once 'Zend/Log.php';
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
/** Zend_Log_Formatter_Firebug */
require_once 'Zend/Log/Formatter/Firebug.php';
/**
* Writes log messages to the Firebug Console via FirePHP.
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Syslog.php 25024 2012-07-30 15:08:15Z rob $
/** Zend_Log */
require_once 'Zend/Log.php';
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
/**
* Writes log messages to syslog
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
/** Zend_Log_Exception */
require_once 'Zend/Log/Exception.php';
/** Zend_Log_Formatter_Simple*/
require_once 'Zend/Log/Formatter/Simple.php';
/**
* Class used for writing log messages to email via Zend_Mail.
*
* @subpackage Zend_Cache_Backend
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/**
* Array to log actions
*
* @var array $_log
*/
private $_log = array();
/**
* Current index for log array
{
$this->_addLog('construct', array($options));
{
$this->_addLog('test', array($id));
{
$this->_addLog('save', array($data, $id, $tags));
* @subpackage Plugin
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/**
* Plain log style.
*/
const LOG = 'LOG';
/**
* Determine if logging to user-agent is enabled.
*
* @return boolean Returns TRUE if logging is enabled.
if ($meta['Type']===null) {
$meta['Type'] = self::LOG;
if (isset($options['fixZendLogOffsetIfApplicable']) && $options['fixZendLogOffsetIfApplicable']) {
if (count($trace) >=3 &&
isset($trace[0]['file']) && substr($trace[0]['file'], -7, 7)=='Log.php' &&
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
/** Zend_Log_Formatter_Simple */
require_once 'Zend/Log/Formatter/Simple.php';
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log_Filter_Priority */
require_once 'Zend/Log/Filter/Priority.php';
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*/
abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface
/**
* @var array of Zend_Log_Filter_Interface
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*/
class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
/**
* Create a new instance of Zend_Log_Writer_ZendMonitor
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/** Zend_Log_Writer_Abstract */
require_once 'Zend/Log/Writer/Abstract.php';
* @category Zend
* @package Zend_Log
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*/
class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
/**
* Name of the log table in the database
* @subpackage App
* @version $Id: LoggingHttpClientAdapterSocket.php 24593 2012-01-05 20:35:02Z matthew $
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* Overrides the traditional socket-based adapter class for Zend_Http_Client to
* enable logging of requests. All requests are logged to a location specified
* in the config as $config['logfile']. Requests and responses are logged after
* they are sent and received/processed, thus an error could prevent logging.
*
* @subpackage App
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*/
class Zend_Gdata_App_LoggingHttpClientAdapterSocket extends Zend_Http_Client_Adapter_Socket
/**
* The file handle for writing logs
* @subpackage Storage
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
/**
* @see Zend_Service_Log_Writer_Abstract
*/
require_once 'Zend/Service/Log/Writer/Abstract.php';
* @package Zend_Service_WindowsAzure
* @subpackage Log
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Service_WindowsAzure_Log_Writer_WindowsAzure extends Zend_Service_Log_Writer_Abstract
/**
* @var Zend_Service_Log_Formatter_Interface
/**
* Name of the table to use for logging purposes
* @package Zend_Cache
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @package Zend_Cache
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*
* ====> (boolean) logging :
* - If set to true, logging is activated (but the system is slower)
}
$this->_loggerSanity();
$this->_log("Zend_Cache_Core: load item '{$id}'", 7);
// maybe the cache is corrupted, so we remove it !
$this->_log("Zend_Cache_Core::save(): failed to save item '{$id}' -> removing it", 4);
if ($data!=$data2) {
$this->_log("Zend_Cache_Core::save(): write control of item '{$id}' failed -> removing it", 4);
* @subpackage Zend_Cache_Backend
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage Zend_Cache_Backend
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
*
* =====> (int) logging :
* - if set to true, a logging is activated throw Zend_Log
*
'lifetime' => 3600,
'logging' => false,
'logger' => null
}
Zend_Cache::throwException('Logger object is not an instance of Zend_Log class.');
// Create a default logger to the standard output stream
* @subpackage LiveDocx
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @subpackage LiveDocx
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
$this->_credentials = array();
$this->_loggedIn = false;
/**
* Clean up and log out of LiveDocx service
{
return $this->logOut();
));
$this->_loggedIn = true;
throw new Zend_Service_LiveDocx_Exception(
'Cannot login into LiveDocx service - username and/or password are invalid', 0, $e
return $this->_loggedIn;
* @package Zend_Translate
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @package Zend_Translate
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
if (!$this->_options['disableNotices']) {
if ($this->_options['log']) {
$this->_options['log']->notice("The language '{$attrib['srclang']}' can not be set because it does not exist.");
} else {
if (!$this->_options['disableNotices']) {
if ($this->_options['log']) {
$this->_options['log']->notice("The language '{$attrib['xml:lang']}' can not be set because it does not exist.");
} else {
* @subpackage Framework
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @package Zend_Tool
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
\$this->getResponse()->setHttpResponseCode(404);
\$priority = Zend_Log::NOTICE;
\$this->getResponse()->setHttpResponseCode(500);
\$priority = Zend_Log::CRIT;
// Log exception, if logger available
if (\$log = \$this->getLog()) {
\$log->log(\$this->view->message, \$priority, \$errors->exception);
\$log->log('Request Parameters', \$priority, \$errors->request->getParams());
}
new Zend_CodeGenerator_Php_Method(array(
'name' => 'getLog',