gobline / logwriter-db
DB Log Writer component
v2.0.0
2015-12-03 09:20 UTC
Requires
- php: >=5.6.0
- gobline/logger: ~2.0
- psr/log: 1.0.*@dev
This package is auto-updated.
Last update: 2024-11-12 19:16:19 UTC
README
Gobline\Logger\Writer\DbLogWriter
writes log information to a database.
Usage
$metadata = new Gobline\Logger\Writer\TableMetadata('logs'); $metadata ->setColumnLevel('level') ->setColumnMessage('message') ->setColumnExceptionCode('exception_code') ->setColumnExceptionStackTrace('exception_stack_trace'); $writer = new Gobline\Logger\Writer\DbLogWriter($pdo, $metadata); $writer->info('hello world');
Installation
You can install the DB Log Writer component using the dependency management tool Composer. Run the require command to resolve and download the dependencies:
composer require gobline/logwriter-db