PHP code example of jiedian / app-log

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

    

jiedian / app-log example snippets




use Jiedian\AppLog\Log;

// 写入日志
Log::getInstance('app')->info('testmessage');



namespace Config;

/**
 * Class MNLogger .
 */
class MNLogger
{
	public $appLog = array (
   		'on'  => true, //标识该项目是否启用业务日志
    		'app' => 'api-test', //标识项目名称
    		'tag' => array('app' => '/home/logs/app.log'), //日志标签列表,key=>value形式,key标识类型,value标识日志文件全路径
	);
}