PHP code example of peiit / jplogger

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

    

peiit / jplogger example snippets


  Peiit\JPLogger\JPLoggerServiceProvider::class,
  

  $app->register(Peiit\JPLogger\JPLoggerServiceProvider::class);
  

//Example
$log_name = 'jp_test';//log file name
$j_log = app('JPLogger')->logger($log_name);//Create a logger
        
$j_log->info('do something****' . microtime(true),['param1','param2']);//log a info
$j_log->error('some err****' . microtime(true));//log a error