kholil/nitik 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kholil/nitik

Composer 安装命令:

composer require kholil/nitik

包简介

A Laravel package to track and aggregate application errors via custom log driver, with Filament dashboard.

README 文档

README

Nitik Dashboard Preview

Nitik is a robust error tracking package for Laravel and Filament. It aggregates unique errors into a database and provides a sleek dashboard to manage them.

Features

  • Unique Error Aggregation: Combines similar errors into a single record with a count of occurrences.
  • Smart Stack Trace: Captures and filters stack traces for better readability, skipping internal baggage.
  • Filament Integration: Comes with a ready-to-use Filament resource to monitor and manage errors.
  • Infinite Loop Protection: Prevents recursive logging loops if the database or driver fails.

Requirements

  • PHP: ^8.1
  • Laravel: ^10.0 | ^11.0 | ^12.0
  • Filament: ^4.0 | ^5.0

Installation

composer require kholil/nitik
php artisan migrate

Configuration

1. Publish Config and Migrations

php artisan vendor:publish --tag=nitik

2. Add Log Channel

Add the nitik channel to your config/logging.php:

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'nitik'],
        'ignore_exceptions' => false,
    ],

    'nitik' => [
        'driver' => 'nitik',
        'level' => 'debug',
    ],
    // ...
],

3. Register Filament Plugin

Add the NitikPlugin to your Filament Panel Provider:

use Kholil\Nitik\NitikPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            NitikPlugin::make(),
        ]);
}

Artisan Commands

Clean up your error records periodically using these commands:

Clear Resolved Errors

Hapus semua error yang sudah ditandai sebagai 'Resolved'.

php artisan nitik:clear-resolved

Prune Old Errors

Hapus error lama berdasarkan jumlah hari (default: 30 hari).

php artisan nitik:prune --days=30

Configuration Options

Edit config/nitik.php to customize behavior:

  • log_levels: Array of levels (e.g., error, critical) to capture.
  • ignore_exceptions: List of exception classes to skip (e.g., NotFoundHttpException).
  • navigation_group: Label for Filament navigation grouping (default: null).

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固