PHP code example of saurav-suman / logger
1. Go to this page and download the library: Download saurav-suman/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/ */
saurav-suman / logger example snippets
ogging\Logging;
$log=new Logging();
$log->setRabbitmqHost("127.0.0.1");
$log->setRabbitmqPort("5672");
$log->setRabbitmqUser("guest");
$log->setRabbitmqPassword("guest");
$log->setQueuePrefix("ayopop");
$log->setQueueNames(array("Api" => "api",
"Debug" => "debug",
"Info" => "info",
"Warn" => "warning",
"Error" => "error",
"Critical" => "critical"));
$log->connect();
$log->info("saurav",array("foo"=>"bar"));
$log->warning("saurav",array("foo"=>"bar"));