Download the PHP package logdash/php-sdk without Composer
On this page you can find all versions of the php package logdash/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download logdash/php-sdk
More information about logdash/php-sdk
Files in logdash/php-sdk
Package php-sdk
Short Description Modern observability platform SDK for PHP
License MIT
Homepage https://github.com/logdash-io/php-sdk
Informations about the package php-sdk
Logdash PHP SDK
Official PHP SDK for Logdash.io - Zero-configuration observability platform designed for developers working on side projects and prototypes.
Why Logdash?
Most observability solutions feel overwhelming for small projects and prototypes. Logdash provides instant logging and real-time metrics without complex configurations. Just add the SDK and start monitoring your application immediately.
Key Features
- 🚀 Zero Configuration: Start logging and tracking metrics in seconds
- 📊 Real-time Dashboard: Cloud-hosted interface with live data updates
- 📝 Structured Logging: Multiple log levels with rich context support
- 📈 Custom Metrics: Track counters, gauges, and business metrics effortlessly
- ⚡ Asynchronous: Non-blocking operations with automatic resource management
- 🛡️ Production Ready: Built with enterprise-grade patterns and error handling
- 🔧 Framework Agnostic: Works with Laravel, Symfony, or standalone PHP apps
- 🐘 PHP 8.1+ Compatible: Supports PHP 8.1, 8.2, 8.3, and all newer versions
Pre-requisites
Setup your free project in less than 2 minutes at logdash.io
Installation
Composer
Quick Start
Basic Logging (Local Only)
Cloud Logging & Metrics
Framework Integration
Laravel
Symfony
API Reference
Logdash
Logdash::create(array $params = []): Logdash
Creates a new Logdash instance.
Parameters:
apiKey
(string, optional): Your Logdash API key. If not provided, only local logging will workhost
(string, optional): Logdash API host. Defaults tohttps://api.logdash.io
verbose
(bool, optional): Enable verbose internal logging. Defaults tofalse
Logger
The logger provides methods for different log levels:
error(...$data)
: Log error level messageswarn(...$data)
: Log warning level messagesinfo(...$data)
: Log info level messageslog(...$data)
: Alias for info levelhttp(...$data)
: Log HTTP-related messagesverbose(...$data)
: Log verbose messagesdebug(...$data)
: Log debug messagessilly(...$data)
: Log silly level messages
Metrics
set(string $name, float $value): void
Set a metric to a specific value.
mutate(string $name, float $value): void
Change a metric by the specified amount (can be positive or negative).
Log Levels
The SDK supports the following log levels (in order of severity):
- ERROR: Error conditions
- WARN: Warning conditions
- INFO: Informational messages
- HTTP: HTTP request/response logs
- VERBOSE: Verbose informational messages
- DEBUG: Debug-level messages
- SILLY: Very detailed debug information
Configuration
Environment Variables
You can use environment variables for configuration:
Error Handling
The SDK is designed to be non-blocking and fail silently in production. If there are issues with the API connection:
- Local logging will continue to work
- API errors are logged internally when verbose mode is enabled
- Your application will not be affected by Logdash connectivity issues
Requirements
- PHP 8.1 or higher
- Guzzle HTTP client (automatically installed via Composer)
Development
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- 📧 Email: [email protected]
- 🌐 Website: logdash.io
- 📚 Documentation: docs.logdash.io
- 🐛 Issues: GitHub Issues