Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Static Logger Factory for PHP 5.3
PHP
branch: master
Failed to load latest commit information.
src/Che/LogStock LoggerManager::getLogger() should be static
tests LoggerManager::getLogger() should be static
.gitignore Move service lovator to separate library. Use PSR-3 logger
.travis.yml
LICENSE Add first prototype
README.md Update readme
composer.json Clean code docs, remove NullLoggerLoader
composer.lock Move service lovator to separate library. Use PSR-3 logger
phpunit.xml.dist Move service lovator to separate library. Use PSR-3 logger

README.md

LogStock - Static Logger Manager Build Status

Logging functionality is required in all classes, so it is one of situations where static code is a good choice. Now you can create more logs with your preferred logging library.

Installation

Composer package is available.

Or just clone the repository (or download versions by tags) and include the library with PSR-0 autoloader.

Usage

namespace Acme\Foo;

use Che\LogStock\LoggerManager;

class Bar
{
    private $logger;

    public function __construct()
    {
        $this->logger = LoggerManager::getLogger(__CLASS__);
    }

    public function doSomething($param)
    {
        $this->logger->info('Do something.', array('param' => $param));
        //...
    }
}

Integration

Author

Kirill chEbba Chebunin iam@chebba.org.

License

LogStock is subject to the MIT license that is bundled with this package in the file LICENSE.

Something went wrong with that request. Please try again.