corpsoft / logging
此包最新版本(v1.0.0)没有可用的许可信息。
系统全局Slack日志
v1.0.0
2023-06-29 08:58 UTC
Requires
- php: ^8.0
- ext-json: *
- illuminate/bus: ^9.18|^10.0
- illuminate/conditionable: ^9.18|^10.0
- illuminate/console: ^9.18|^10.0
- illuminate/database: ^9.18|^10.0
- illuminate/pipeline: ^9.18|^10.0
- illuminate/support: ^9.18|^10.0
- laravel/slack-notification-channel: ^2.0
- symfony/console: ^6.0
This package is auto-updated.
Last update: 2024-09-29 12:15:50 UTC
README
日志问题
此包包含
- 记录所有异常
- 任务失败时记录
- 查询过长时记录
设置
检查提供者
检查在config/app.php
的"providers"
是否存在以下提供者
Corpsoft\Logging\LoggingServiceProvider::class,
发布配置文件
发布配置文件
php artisan vendor:publish --tag=logging
设置Slack webhook
打开链接 https://slack.com/apps/A0F7XDUAZ-incoming-webhooks,获取webhook URL,并在.env中放入
在.env文件中添加
LOG_CS_SLACK_WEBHOOK_URL=
配置文件和.env变量(信息用)
可能的.env变量
LOG_CS_ENABLE_JOB_FAILED_TRACKING= LOG_CS_ENABLE_QUERYING_LONG_TRACKING= LOG_CS_ENABLE_GLOBAL_EXCEPTION_TRACKING= LOG_CS_MAX_QUERYING_TIME_TRACKING=
以下是config\logging-problems.php的描述
'enable_in_environment' // Which environment enabled. Default enabled 'production' 'enable_job_failed_tracking' // Includes Tracking of Failing Job. Default true 'enable_querying_for_longer_time_tracking' // Includes Tracking of long query. Default true 'enable_global_exception_tracking' // Includes global tracking of 500 errors Default true 'max_querying_time_tracking' // The maximum query threshold at which this will be logged (in milliseconds), the default is 1000