PHPackages                             schauinsland/laravel-splunk-logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. schauinsland/laravel-splunk-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

schauinsland/laravel-splunk-logger
==================================

Splunk Logging Driver for Laravel

v1.0.1(1y ago)31.4k—8.3%[2 issues](https://github.com/schauinsland/laravel-splunk-logger/issues)[1 PRs](https://github.com/schauinsland/laravel-splunk-logger/pulls)MITPHP

Since Mar 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/schauinsland/laravel-splunk-logger)[ Packagist](https://packagist.org/packages/schauinsland/laravel-splunk-logger)[ RSS](/packages/schauinsland-laravel-splunk-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (5)Used By (0)

Laravel Splunk Logger
=====================

[](#laravel-splunk-logger)

- [Laravel Splunk Logger](#laravel-splunk-logger)
    - [About](#about)
    - [Features](#features)
    - [Installation](#installation)
    - [Requirements](#requirements)
    - [Setup](#setup)
        - [Library Configuration](#library-configuration)
        - [Splunk Configuration](#splunk-configuration)
        - [Example .env](#example-env)
    - [Usage](#usage)
    - [Output Example](#output-example)
    - [Bug report or Feature request](#bug-report-or-feature-request)
    - [Want to Contribute?](#want-to-contribute)
    - [Code of Conduct](#code-of-conduct)

---

About
-----

[](#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
--------

[](#features)

- **Native Logger Compatibility**: Effortlessly use `Illuminate\Support\Facades\Log::class` to 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 `.env` file 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
------------

[](#installation)

```
composer require schauinsland/laravel-splunk-logger
```

Requirements
------------

[](#requirements)

- **Laravel** &gt;= 11
- **Splunk HEC**: Enabled instance

Setup
-----

[](#setup)

Configure the following settings in your `.env` file:

### Library Configuration

[](#library-configuration)

- **LOG\_CHANNEL**: Set to `splunk` or `stack` if you want multiple log drivers
- **LOG\_STACK**: Comma-separated list of drivers (e.g., `single,splunk` for 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-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

[](#example-env)

```
LOG_CHANNEL=stack
LOG_STACK=single,splunk
LOG_LEVEL=debug

SPLUNK_URL=://:/services/collector
SPLUNK_TOKEN=...
SPLUNK_INDEX=index_test
SPLUNK_SOURCE=source_test
SPLUNK_SSL_VERIFY=true
```

Usage
-----

[](#usage)

```
Log::channel('splunk')->info('Custom Log Info referring explicit splunk');

Log::error(
    'This is a custom Error',
    ['user_id' => 1, 'name' => 'John Doe', 'email' => 'john@doe.com', 'is_admin' => false]
);

try {
    DB::table('non_existent_table')->get();
} catch (\Exception $e) {
    Log::error('Error with Trace', [
        'message' => $e->getMessage(),
        'stack' => $e->getTraceAsString(),
    ]);
}
```

For more custom logging options, refer to the [Laravel Logging Documentation](https://laravel.com/docs/11.x/logging#writing-log-messages).

Output Example
--------------

[](#output-example)

```
{
  "message":"This is a custom Error",
  "context": {
    "user_id":1,
    "name":"John Doe",
    "email":"john@doe.com",
    "is_admin":false
  },
  "level":400,
  "level_name":"ERROR",
  "channel":"Laravel",
  "datetime":"2025-03-05T11:35:46.111298+00:00",
  "extra":[]
}
```

Bug report or Feature request
-----------------------------

[](#bug-report-or-feature-request)

If you encounter a bug or have a feature request, please [create an issue](https://github.com/schauinsland/laravel-splunk-logger/issues).

Want to Contribute?
-------------------

[](#want-to-contribute)

Refer to [CONTRIBUTING.md](./docs/CONTRIBUTING.md).

Code of Conduct
---------------

[](#code-of-conduct)

Before contributing to this repository, please read the [code of conduct](./docs/CODE_OF_CONDUCT.md).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

439d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/201221906?v=4)[SLR-DEV](/maintainers/slr-dev)[@slr-dev](https://github.com/slr-dev)

---

Top Contributors

[![Gentuka](https://avatars.githubusercontent.com/u/74459797?v=4)](https://github.com/Gentuka "Gentuka (3 commits)")

---

Tags

driverlaravellaravel-packageloggeropen-sourcephpsplunksplunk-httplaravelloggingdriverloggerslrsplunkschauinslandschauinsland-reisen

### Embed Badge

![Health badge](/badges/schauinsland-laravel-splunk-logger/health.svg)

```
[![Health](https://phpackages.com/badges/schauinsland-laravel-splunk-logger/health.svg)](https://phpackages.com/packages/schauinsland-laravel-splunk-logger)
```

###  Alternatives

[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
