New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

goedemiddag/betterstack-logs

Monolog handler for Better Stack Logs
544,449 6
Install
composer require goedemiddag/betterstack-logs
Latest Version:v1.4.0
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Aug 20, 2026
Links: GitHub  ·  Packagist
Maintainer: Goedemiddag

Monolog handler for Better Stack Logs

Laravel Compatibility

This package allows you to write logs to Better Stack Logs.

Installation

First use composer to install the package using the following command

composer require goedemiddag/betterstack-logs

Usage

Add a new channel to the config/logging.php file

'channels' => [
    ...
    'betterstack' => [
        'driver'       => 'monolog',
        'level'        => env('LOG_LEVEL', 'debug'),
        'enabled'      => env('BETTERSTACK_LOGS_ENABLED', true),
        'handler'      => \Goedemiddag\BetterStackLogs\BetterStackHandler::class,
        'handler_with' => [
            'sourceToken' => env('BETTERSTACK_LOGS_SOURCE_TOKEN'),
            'host'        => env('BETTERSTACK_LOGS_HOST'),
        ],
    ],
    ...
]

Set the default log channel to betterstack or add it to the stack channel.

Add the following to your .env file:

BETTERSTACK_LOGS_SOURCE_TOKEN=your-source-token
BETTERSTACK_LOGS_HOST=your-ingestion-host

Related Packages

edujugon/laravel-log

Simple API to write logs for Laravel.

11,018 19
triadev/laravel-logger-provider

A laravel service provider for logging.

199 0
fryiee/custom_log

A Custom Log class built on Monolog's Logger.

73 0
tmountjr/muted-log

Provides a "muted" log writer. The primary purpose is to log exceptions without...

13 0
itelmenko/laravel-mysql-logger

Laravel MySQL driver for Monolog

157,235 21

Version History

Version Released PHP Laravel License
v1.4.0 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
v1.3.0 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
1.2.2 ^8.2 ^10.0|^11.0|^12.0 MIT
1.2.1 ^8.2 ^10.0|^11.0|^12.0 MIT
1.2.0 ^8.2 ^10.0|^11.0|^12.0 MIT