Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Betterstack Logs

Betterstack Logs Laravel Package

goedemiddag/betterstack-logs

Laravel package for integrating Better Stack Logs with your application. It helps route Laravel logs to Better Stack for centralized collection, monitoring, and debugging, making production logs easier to search and manage.

View on GitHub
Deep Wiki
Context7

This package allows you to write logs to Better Stack Logs

Frequently asked questions about Betterstack Logs
How do I install goedemiddag/betterstack-logs in a Laravel app?
Install it with composer require goedemiddag/betterstack-logs, then publish the package config file with php artisan vendor:publish. Set the Better Stack source token and endpoint through environment variables and add the channel to config/logging.php. There is no middleware, no service container override, and no database footprint, so the integration is configuration only.
Which Laravel and PHP versions does this package support?
The package targets modern Laravel on PHP 8.x and sits on Laravel's native Monolog logging stack. Release notes do not publish an explicit version matrix, so treat Laravel 10, 11, and 12 as compatible until you confirm the constraints in composer.json. Check the monolog/monolog and illuminate/support requirements before committing to a version.
How do I configure the Better Stack source token and endpoint?
Publish the package config and set the source token and ingestion endpoint via environment variables so credentials stay out of version control. The channel is then declared in config/logging.php using the package driver and references those env values. Keep separate tokens per environment so staging and production logs do not mix in Better Stack.
How do I send logs to Better Stack alongside my existing channels?
Add a betterstack channel next to your existing single, daily, or stderr channels, then compose it into the stack channel so logs fan out to both destinations. Existing logging behavior is preserved because nothing else changes. Rollback is a one-line config revert with no data migration, which keeps the blast radius small.
Does shipping logs to Better Stack add latency to user-facing requests?
The handler transmits over HTTP, so whether the call happens inline during the request or through a buffered or queued path determines the latency impact. Confirm this against the actual handler implementation rather than assuming it is asynchronous. Run a short spike in a scratch app and measure p99 added latency at your expected log volume before rolling it out.
What happens if Better Stack is unreachable or the token is wrong?
Logging libraries conventionally swallow transport errors to avoid cascading failures, which means a misconfigured token can look identical to no traffic. Version 1.4.0 improved error handling and expanded test coverage, which suggests failures are surfaced or handled more deliberately now. Verify in code whether the handler drops, retries, buffers to disk, or throws, and whether that behavior is configurable.
Is the package compatible with Monolog 3?
The package relies on Laravel's Monolog integration, and the release notes do not document a Monolog 2 versus Monolog 3 compatibility matrix. Check the monolog/monolog constraint in composer.json against the Monolog version your Laravel release ships. Test the channel in a scratch app after any Monolog major upgrade before promoting it.
Does it respect Laravel's LOG_LEVEL, and can I sample debug logs separately?
Yes. Laravel's per-channel level setting in config/logging.php controls verbosity, so you can route error and above to Better Stack while keeping full-fidelity logs locally. Declaring separate channels lets you sample debug-level noise independently of error-level events. This is a policy decision about which channels route where, not an engineering change.
How do I redact PII before logs are sent to Better Stack?
The package overview does not document a built-in redaction or PII scrubbing path, so sanitize data before it reaches the handler. A Monolog processor or careful control over logged context and exception payloads is the usual approach. Also review Better Stack retention, access controls, and ingestion rules so sensitive fields are not stored longer than necessary.
Is goedemiddag/betterstack-logs actively maintained and safe for production?
It is a single-maintainer open source package with low commit velocity, which is normal for a thin logging adapter but worth tracking. The 1.3.0 to 1.4.0 release is a backwards-compatible minor with no breaking changes, deprecations, or config renames. Pin ^1.4 to pick up the improved error handling and test coverage, and keep a local channel configured as a fallback.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource