PHP code example of micronext / php-std-logger

1. Go to this page and download the library: Download micronext/php-std-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/ */

    

micronext / php-std-logger example snippets




namespace YourAmazingApp;

use Psr\Log\LogLevel;
use MicroNext\StdOut\Logger;

$logger = new Logger;

$logger->emergency("emergency test");
$logger->alert("alert test");
$logger->critical("critical test");
$logger->error("error test");
$logger->warning("warning test");
$logger->notice("notice test");
$logger->info("info test");
$logger->debug("debug test");

// Also, you can call ->log() directly:
$logger->log(LogLevel::NOTICE, "notice throught log test";
$logger->log(null, "log test");
sh
git clone https://github.com/micronext/php-std-logger
cd php-std-logger
composer install