1. Go to this page and download the library: Download programster/pgsql-logger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
programster / pgsql-logger example snippets
# Connect to your database
$pgsqlConn = pg_connect($connectionString);
# Create the logger using your Pgsql connection.
$logger = new \Programster\PgsqlLogger\PgSqlLogger($pgsqlConn);
# Create some logs using the standard PSR-3 interface
$logger->debug("This is an info log");
$logger->notice("This is a notice log", ['name' => 'value']);
$logger->info("This is an info log", ['name' => 'value']);
$logger->warning("This is a warning log", ['name' => 'value']);
$logger->alert("This is an alert log", ['name' => 'value']);
$logger->emergency("This is an emergency log", ['name' => 'value']);
$logger->critical("This is a critical log", ['name' => 'value']);
$logger->log(\Psr\Log\LogLevel::WARNING, "This is another warning log", ['name' => 'value']);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.