用户账变 用户钱包
This commit is contained in:
25
app/Tools/Logs.php
Normal file
25
app/Tools/Logs.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tools;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Logs
|
||||
{
|
||||
static function ErrLog($title, \Exception $e, $params = []): void
|
||||
{
|
||||
Log::error(self::getTitle($title,'success:'), ['message' => $e->getMessage(), 'trace' => $e->getTrace(), 'params' => $params]);
|
||||
}
|
||||
|
||||
static function SuccLog($title, $params = []): void
|
||||
{
|
||||
Log::error(self::getTitle($title,'error:'), $params);
|
||||
}
|
||||
|
||||
static function getTitle($title,$prefix=''): string
|
||||
{
|
||||
return $title.' '.$prefix;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user