oanhnn/laravel-logzio
Laravel integration for Logz.io logging. Configure your Logz.io token and Laravel logging stack to send application logs through a Monolog handler for centralized collection, search, and monitoring.
Start by checking the package’s composer.json constraints against your Laravel version before adopting it; v1.1.1 is a 2021 release, so do not assume compatibility with newer Laravel versions without testing. Install with Composer, publish the package config, and wire its logging channel into config/logging.php.
Set the minimum environment values:
LOGZIO_TOKEN=your-logzio-token
LOGZIO_REGION=uk
The v1.1.1 release adds UK as a supported region. Use uk when UK data residency is required; otherwise use the region matching your Logz.io account. The first practical use case is a dedicated production log channel that ships Laravel application logs to Logz.io while keeping a local fallback channel.
Look first at:
config/logging.php for channel wiring.Validate with a single test log from a staging environment before routing production traffic.
Use a dedicated Logz.io channel rather than replacing all local logging. A common pattern is a Laravel stack channel that keeps local daily logs and adds Logz.io for centralized search:
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily', 'logzio'],
],
],
Configure the package-provided Logz.io channel with environment-specific token and region values. Keep region selection in .env per environment so staging and production cannot accidentally ship to the wrong Logz.io region.
Use Logz.io’s type/service metadata to separate applications, queues, and scheduled jobs. Add Monolog processors for stable fields such as app, env, release, request_id, and queue_job_id; this makes Logz.io queries and dashboards much more useful than raw messages.
For day-to-day Laravel work:
Log::channel('logzio') or the stack.Log::channel('logzio')->info('test').For high-volume services, review log volume and sampling before enabling the channel broadly. Logz.io ingestion has cost and network implications, and synchronous log shipping can add latency if the transport is slow or unavailable.
php artisan config:clear or php artisan config:cache as appropriate.Log:: call.Overall, v1.1.1 is a small but useful release for teams needing UK Logz.io shipping. The package is practical for Laravel apps already standardized on Logz.io, but it should be adopted with version-compatibility checks, a local fallback channel, and clear rules around sensitive data.
How can I help you explore Laravel packages today?