Download the PHP package schauinsland/laravel-splunk-logger without Composer
On this page you can find all versions of the php package schauinsland/laravel-splunk-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download schauinsland/laravel-splunk-logger
More information about schauinsland/laravel-splunk-logger
Files in schauinsland/laravel-splunk-logger
Package laravel-splunk-logger
Short Description Splunk Logging Driver for Laravel
License MIT
Informations about the package laravel-splunk-logger
Laravel Splunk Logger
- Laravel Splunk Logger
- About
- Features
- Installation
- Requirements
- Setup
- Library Configuration
- Splunk Configuration
- Example .env
- Usage
- Output Example
- Bug report or Feature request
- Want to Contribute?
- Code of Conduct
About
A simple Splunk Logger package for Laravel that integrates seamlessly with Splunk's HTTP Event Collector (HEC). This package provides robust logging capabilities, enabling developers to capture and analyze application events in real-time with Splunk.
Features
-
Native Logger Compatibility: Effortlessly use
Illuminate\Support\Facades\Log::classto send logs directly to Splunk, keeping your existing logging syntax intact. -
Automatic Integration with Laravel Logging System: The library automatically merges with Laravel's
config/logging.php, eliminating the need for manual configuration. Simply add the necessary credentials in the.envfile to get started. - Captures All Laravel Errors in Debug Mode: Automatically logs all Laravel exceptions and errors to Splunk when the application is in debug mode, providing comprehensive error insights during development.
Installation
Requirements
- Laravel >= 11
- Splunk HEC: Enabled instance
Setup
Configure the following settings in your .env file:
Library Configuration
- LOG_CHANNEL: Set to
splunkorstackif you want multiple log drivers - LOG_STACK: Comma-separated list of drivers (e.g.,
single,splunkfor multiple log drivers) - LOG_LEVEL: Defines the minimum severity level for logging. All errors and messages filtered by this setting will be sent to Splunk.
Splunk Configuration
- SPLUNK_URL: URL of your Splunk HEC instance
- SPLUNK_TOKEN: Token for Splunk HEC authentication
- SPLUNK_INDEX: Target Splunk index for storing logs (must exist in Splunk)
- SPLUNK_SOURCE: Source identifier for the logs
- SPLUNK_SSL_VERIFY: Whether to send logs over HTTPS (
true) or HTTP (false)
Example .env
Usage
For more custom logging options, refer to the Laravel Logging Documentation.
Output Example
Bug report or Feature request
If you encounter a bug or have a feature request, please create an issue.
Want to Contribute?
Refer to CONTRIBUTING.md.
Code of Conduct
Before contributing to this repository, please read the code of conduct.