Skip to content

gobline/logwriter-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Log Writer component

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

About

Write log information to a database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages