代码初始化
This commit is contained in:
27
application/common/library/Log.php
Normal file
27
application/common/library/Log.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\library;
|
||||
|
||||
use Psr\Log\AbstractLogger;
|
||||
use think\Hook;
|
||||
|
||||
/**
|
||||
* 日志记录类
|
||||
*/
|
||||
class Log extends AbstractLogger
|
||||
{
|
||||
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function log($level, $message, array $context = [])
|
||||
{
|
||||
\think\Log::write($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user