qshurick / pro_log
Logger
Installs: 218
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/qshurick/pro_log
Requires (Dev)
- phpunit/phpunit: 3.7.*
- zendframework/zendframework1: 1.12.x
Suggests
- zendframework/zendframework1: This only works with Zend Framework 1.x
This package is not auto-updated.
Last update: 2025-09-27 20:24:13 UTC
README
Ensure in application.ini:
autoloaderNamespaces[] = "Logger_"
pluginPaths.Logger_Application_Resource_ = "Logger/Application/Resource"
config.logger = APPLICATION_PATH "/configs/log.ini"
Ensure in include_path
directory 'vendor/qshurick/pro_log/library'
, e.g. in public_html/index.php
:
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
realpath(APPLICATION_PATH . '/../vendor/qshurick/pro_log/library'),
get_include_path(),
)));
require_once APPLICATION_PATH . '/../vendor/autoload.php';
Usage
- with Zend_Registry:
// Logger_Application_Logger Zend_Registry::get('logger')->log('Log message');
- direct:
// Logger_Application_Logger Logger_Application_Logger::getInstance()->log('Log message');
- embed:
class SomeLoggedClass { /** ... */ function init() { /** ... */ // Zend_Log $this->logger = Zend_Registry::get('logger')->ensureStream('custom-logger'); $this->logger->log('Log message', Zend_Log::INFO); /** ... */ } /** ... */ }
deprecated (just for current compatibility)
Pro_Log::log('Log message');