定制 mlehner/gelf-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mlehner/gelf-php

最新稳定版本:v1.1.0

Composer 安装命令:

composer require mlehner/gelf-php

包简介

Fork of gelf-php with PHP namespace support

README 文档

README

Build Status

This library is abled to send GELF v1.1 Messages to compatible servers like a Graylog2 Server in version v0.20.

Status

This library is quite old and has just the single mentioned feature.

Further development and new features are not desired in favor of this newer fork bzikarsky/gelf-php.

Installation

Simply require the package by its name with composer:

$ php composer.phar require mlehner/gelf-php "~1.1.0"

Usage

Example:

// Create a Message and set your logging information. $message = new Message(); $message->setFullMessage('Your full log mesage'); $message->setHost('example.com'); $message->setLevel(3); // List of supported levels: http://en.wikipedia.org/wiki/Syslog#Severity_levels $message->setShortMessage('Short message'); $message->setTimestamp(time()); $message->setVersion('1.2.3'); // The following values are deprecated and will be transferred as additionals. $message->setFile('foo.php'); $message->setLine(42); $message->setFacility('server42'); // Create a Publisher and send the message to your GELF server. // Beware: Hostnames need a DNS lookup, which might be slow! $publisher = new MessagePublisher('192.168.99.99'); $publisher->publish($message);

License

This bundle is licensed under MIT.

统计信息

  • 总下载量: 710.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 23
  • 点击次数: 3
  • 依赖项目数: 3
  • 推荐数: 1

GitHub 信息

  • Stars: 20
  • Watchers: 4
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固