PHP code example of kxutils / log4l

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

    

kxutils / log4l example snippets


kxutils/log4l

"repositories":[
{
    "type":"vcs",
    "url":"[email protected]:lib/log4l.git"
}
]

use Log4l\Log;
// 默认调用方式
Log::info($msg);
Log::error($msg);
//配置路径调用方式
Log::conn("test")->info($msg);

//其他能用方法有:
'debug'     => Logger::DEBUG,
'info'      => Logger::INFO,
'notice'    => Logger::NOTICE,
'warning'   => Logger::WARNING,
'error'     => Logger::ERROR,
'critical'  => Logger::CRITICAL,
'alert'     => Logger::ALERT,
'emergency' => Logger::EMERGENCY,