..

php.laravel.log

看代码,原厂代码写的比较清楚,版本(laravel5.7)

简单使用,方便调试,详细使用需要详细查看文档。

 

在config/app.php 添加 'log' => env('APP_LOG', 'single'),到合适位置

 


 

#file:Log.php

namespace Illuminate\Support\Facades;

/**
 * @method static void emergency(string $message, array $context = [])
 * @method static void alert(string $message, array $context = [])
 * @method static void critical(string $message, array $context = [])
 * @method static void error(string $message, array $context = [])
 * @method static void warning(string $message, array $context = [])
 * @method static void notice(string $message, array $context = [])
 * @method static void info(string $message, array $context = [])
 * @method static void debug(string $message, array $context = [])
 * @method static void log($level, string $message, array $context = [])
 * @method static mixed channel(string $channel = null)
 * @method static \Psr\Log\LoggerInterface stack(array $channels, string $channel = null)
 *
 * @see \Illuminate\Log\Logger
 */
class Log extends Facade
{
    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return 'log';
    }
}

 

posted @ 2018-10-27 20:46  罗浩楠  阅读(216)  评论(0编辑  收藏  举报
..