debugbird/php
最新稳定版本:1.0.0
Composer 安装命令:
composer require debugbird/php
包简介
DebugBird PHP SDK
README 文档
README
DebugBird is a lightweight PHP SDK for capturing logs and crashes, sending them to your DebugBird dashboard.
Installation
You can install the package via Composer:
composer require debugbird/php
Usage
Initialize the Logger
Before logging, initialize DebugBird with your project credentials:
require 'vendor/autoload.php'; use DebugBird\DebugBird; DebugBird::init([ 'project_id' => 'your_project_id', 'api_key' => 'your_api_key' ]);
Logging Messages
Log messages with different types:
DebugBird::log('info', 'This is an informational message'); DebugBird::log('warning', 'This is a warning message'); DebugBird::log('error', 'This is an error message');
Capturing Exceptions & Errors
Exceptions and errors are automatically captured once DebugBird is initialized:
throw new Exception('Something went wrong!');
Disabling Specific Logging
You can disable log or crash collection while initializing:
DebugBird::init([ 'project_id' => 'your_project_id', 'api_key' => 'your_api_key', 'disable_logs' => true, // Disables log collection 'disable_errors' => true // Disables error/crash collection ]);
Contributing
Feel free to submit issues and pull requests to improve this SDK.
License
This package is proprietary. Contact contact@debugbird.com for licensing inquiries.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-02-08