Coder Social home page Coder Social logo

reginaldobertoluci-zz / monolog-postgres Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wiosna-dev/monolog-pg

0.0 1.0 1.0 20 KB

Handler para Monolog que permite a gravação de registros em uma tabela PostgreSQL

License: MIT License

PHP 100.00%

monolog-postgres's Introduction

monolog-postgres

Handler para o Monolog que permite a gravação dos registros de log em uma tabela PostgresSQL.

Como utilizar:


use Monolog\Logger;
use PGHandler\PGHandler;

$pdo = new PDO('pgsql:dbname=nomedobanco;host=servidor;user=usuario;password=senha');
$PGHandler = new PGHandler($pdo, 'log_erros');

//Instancia um Logger com um channel teste
$logger = new \Monolog\Logger('teste');
//Adiciona o handler  
$logger->pushHandler($PGHandler);

//Grava um log de exemplo
$logger->addWarning("Esta é uma mensagem de teste.", array('teste'=>'teste'));

monolog-postgres's People

Contributors

waza-ari avatar reginaldobertoluci avatar stefandoorn avatar michaloo avatar

Watchers

Reginaldo Bertoluci Curtio avatar

Forkers

thetangro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.