Git Product home page Git Product logo

gray-driver's Introduction

Graylog 日志系统

支持框架

ThinkPHP 3.2 
ThinkPHP 3.0 
... ...

以ThinkPHP 3.2 为例 3.2 以下版本及别的框架请参考 3.2

首先使用 composer 安装graylog

在自己项目根目录下使用如下命令: composer require graylog2/gelf-php 或在 composer.json 下添加:

"require": {
    // ...
    "graylog2/gelf-php": "^1.5"
    // ...
}

在执行 composer update

其次修改配置

Application/Common/Conf/config.php 中加入


// ...
LOG_RECORD => true, // 开启日志
LOG_TYPE    =>  'graylog', // 日志类型
LOG_GRAY_PATH   => 'graylog.***.com:5502', // 域名:端口号
// ...

最后把 Graylog.class.php 放到项目的 Log 驱动中即可.

如: ThinkPHP/Library/Think/Log/Driver/

gray-driver's People

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.