laravel-gelf-logger

Laravel custom log channel that sends GELF logs to Graylog and compatible backends.

Library
Composer
v13.0.0
135stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
48/100Fair
Development Activity8
Maintenance32
Community72
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture76
Code Quality78
Innovation70
Learning Curve82

Laravel GELF Logger adds a custom log channel to Laravel that formats log messages as GELF (Graylog Extended Log Format) and ships them to a GELF-compatible backend such as Graylog over UDP, TCP, or HTTP. It is a Laravel-native wrapper around the bzikarsky/gelf-php transport, wired into Laravel’s logging configuration.

Once registered, you configure it like any other Laravel log channel - host, port, transport, and optional processors - and then log through the standard Log facade, with entries appearing in Graylog for search and analysis.

What You Get

  • A custom gelf log channel driver for Laravel’s logging config
  • UDP, TCP, and HTTP transport options for delivering GELF messages
  • A GelfLoggerFactory that builds the Monolog handler from channel config
  • Configurable processors to enrich log records with extra fields
  • Compatibility matrix covering Laravel 5.6 through 13

Common Use Cases

  • Shipping Laravel application logs to a central Graylog server
  • Adding structured, searchable logging to a Laravel app
  • Sending logs over UDP for low-overhead delivery at scale
  • Enriching log entries with custom context before they reach Graylog

Under The Hood

Architecture - The package exposes a GelfLoggerFactory (src/GelfLoggerFactory.php) that Laravel’s log manager invokes for the custom gelf channel; the factory reads channel config, selects a UDP/TCP/HTTP transport, builds a GELF publisher and Monolog GelfHandler, and attaches any configured processors from src/Processors. Tech Stack - PHP package built on Monolog and bzikarsky/gelf-php, integrating through Laravel’s custom log channel API and auto-discovered service provider; tested with GitHub Actions across many Laravel versions. Code Quality - The library is small and focused, with a maintained CI test suite and a clear version matrix mapping each release to a supported Laravel version, indicating disciplined upkeep. API Design - Configuration is pure Laravel convention - a channel entry in config/logging.php with driver => gelf and host/port/transport keys - so developers already familiar with Laravel logging need no new API to learn.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search