1.0.0 2025-02-08 09:56 UTC

This package is not auto-updated.

Last update: 2025-09-09 20:18:32 UTC


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.