springtimesoft / silverstripe-raygun-tags
自动将 Silverstripe 标签添加到 Raygun 错误日志中
1.1.1
2024-07-31 04:58 UTC
Requires
- silverstripe/framework: ^5.0
- silverstripe/raygun: ^4.0
Conflicts
This package is auto-updated.
Last update: 2024-08-31 05:28:51 UTC
README
这是一个专门构建的扩展,它通过 silverstripe/silverstripe-raygun 扩展将多个有用的标签添加到发布的错误消息中。
添加以下标签
env:live
(或env:dev
/env:test
)php:8.2.x
host:example.com
framework:5.0.x
ajax:false
(如果是 AJAX 请求则为 true)cli:false
(如果是通过 CLI 运行则为 true)
日志级别设置为 WARNING 及以上(debug & info 被忽略,请参见 配置)。
需求
- Silverstripe ^5.0
- Raygun 应用程序和 API 密钥(请参见 配置)
使用方法
简单地安装模块:composer require springtimesoft/silverstripe-raygun-tags
配置
将环境变量 SS_RAYGUN_APP_KEY="xxxxxxxxx"
添加到您的 .env
文件中。
请参阅原始的 silverstripe/silverstripe-raygun README 了解有关自定义 Raygun 扩展的更多信息。
要更改应用程序的日志级别,您可以通过添加自定义 yaml 文件来覆盖模块的默认设置,例如
--- Name: custom-raygun After: - '#raygun-log-level' Only: envorconstant: 'SS_RAYGUN_APP_KEY' --- # Prevent Raygun from logging debug/info messages, which aren't considered errors SilverStripe\Core\Injector\Injector: SilverStripe\Raygun\RaygunHandler: constructor: level: 100 # Monolog\Level::Debug
安装
composer require springtimesoft/silverstripe-raygun-tags