{"repo":"KarelWintersky/monolog-pdo-handler","free":true,"listed":false,"github":"https://github.com/KarelWintersky/monolog-pdo-handler","clone":"git clone https://github.com/KarelWintersky/monolog-pdo-handler.git","description":"PDO Handler for Monolog, based on Monolog example with some additions","language":"PHP","stars":10,"topics":["database","logging"],"license":"MIT","category":"databases-storage","readme_excerpt":"monolog.KW-PDO-Handler ====================== PDO Handler for Monolog, which allows to store log messages in a MySQL Database via PDO handler. Handler can log text messages to a specific table and creates the table automatically if it does not exist. Installation karelwintersky/monolog-pdo-handler is available via composer. Minimum PHP version is 7.1 Usage Just use it as any other Monolog Handler, push it to the stack of your Monolog Logger instance. The Handler however needs some parameters: - $pdo - PDO Instance of your database. Pass along the PDO instantiation of your database connection with your database selected. - $table - The table name where the logs should be stored. - $additional fields - associative array of additional database fields definitions. All additional columns are created automatically and the fields can later be used in the extra context section of a record. See examples below. Default is empty array . - $additional indexes - associative array of additional database indexes definitions. Default is empty array - $level - The minimum logging level at which this handler will be triggered. Must be any of standard Monolog logging levels (default: Logger::DEBUG) Default fields at logging table - id - defined as BIGINT(20) NOT NULL AUTO INCREMENT PRIMARY KEY ; - ipv4 - defined as int(10) unsigned DEFAULT NULL , will contain client IPv4 or 127.0.0.1 for console scripts; - time - defined as TIMESTAMP , will contain current timestamp; - level - defined as SMALLI","default_branch":null,"files":null,"tree":[],"storefront":"/r/KarelWintersky","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/KarelWintersky/monolog-pdo-handler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}