Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danteay/corephp-log
https://github.com/danteay/corephp-log
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/danteay/corephp-log
- Owner: danteay
- License: mit
- Created: 2018-02-16T00:07:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T18:58:34.000Z (almost 7 years ago)
- Last Synced: 2024-05-01T16:24:06.497Z (8 months ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# corephp-log
An easy log system for php webapps
## Basic use
```php
use CorePHP\Log\Logger;
use CorePHP\Log\Handlers\FileHandler;
use CorePHP\Log\Formatters\WebFormatter;
use CorePHP\Log\Handlers\StdoutHandler;$logger = new Logger('TEST');
$formatter = new WebFormatter();$handler = new FileHandler(__DIR__ . '/logger.log');
$handler1 = new StdoutHandler(true);
$handler->setFormatt($formatter);
$handler1->setFormatt($formatter);$logger->addHandler($handler);
$logger->addHandler($handler1);$logger->error('Mensaje random');
```