PHP code example of leoshtika / logger

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

    

leoshtika / logger example snippets



leoshtika\libs\Logger;

Logger::add();
Logger::add('Action must be taken immediately', Logger::LEVEL_EMERGENCY);
Logger::add('Interesting events', Logger::LEVEL_NOTICE);


leoshtika\libs\Logger;

Logger::add();
Logger::add('Action must be taken immediately', Logger::LEVEL_EMERGENCY);
Logger::add('Interesting events', Logger::LEVEL_NOTICE);

::1 [21/Sep/2014 12:42:41][INFO] (example.php) --> no message
::1 [21/Sep/2014 12:42:41][EMERGENCY] (example.php) --> Action must be taken immediately
::1 [21/Sep/2014 12:42:41][NOTICE] (example.php) --> Interesting events