mlehner/gelf-php
mlehner/gelf-php is a PHP library for sending GELF (Graylog Extended Log Format) messages to Graylog over UDP or TCP, with chunked message support, publishers, transports, and a PSR-3 logger for structured application logging.
Consider it when:
Look elsewhere when:
graylog2/gelf-php and Monolog's GelfHandler. Monolog is the default answer if you already use PSR-3 logging.To executives: This is a free (MIT-licensed), narrow transport library that lets our PHP services push structured logs into a centralized logging backend. The upside is faster incident diagnosis and better auditability at near-zero license cost. The downside is age: it was last released in 2014 and has a single-maintainer-sized community (21 stars). Recommendation: treat it as an internal, vendored utility, not a strategic dependency. It reduces time-to-observability now; we should budget a small amount of engineering to wrap it and be ready to replace it with the maintained alternatives (Monolog's GELF handler or graylog2/gelf-php) if we hit compatibility or reliability issues.
To engineering: It is a thin GELF client — connection setup, payload serialization, optional compression, UDP chunking. Integrate it behind our own Logger interface so the transport is swappable and testable. Validate it against the PHP version we actually run (it predates PHP 7/8), pin the version, vendor it, and add a smoke test plus a replacement ticket. Do not let it leak into domain code; call sites should hit our abstraction.
Bottom line: Adopt only where Graylog is already the destination and the need is immediate; prefer Monolog/graylog2/gelf-php for greenfield work; and in either case, isolate the dependency so the decision stays reversible.
How can I help you explore Laravel packages today?