feat(admin): 新增过滤不需要记录后台日志的方法 add ignoreLog property to exclude log recording for specific actions

- Add 'ignoreLog' property to the Log controller to specify actions that should not be logged
- Implement logic in SystemLog middleware to check if the current action is in the ignoreLog list
- Skip logging for actions listed in ignoreLog, improving performance and reducing log clutter

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
This commit is contained in:
wolfcode
2024-10-12 17:21:56 +08:00
parent 4d7365921e
commit dfe15f7e88
2 changed files with 18 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ use think\response\Json;
*/
class Log extends AdminController
{
protected array $ignoreLog = ['record'];
public function __construct(App $app)
{