Code Monkey home page Code Monkey logo

asynclog's Introduction

asynclog

PHP异步日志收集

syslog调试信息的输出

# 编译asynclog扩展
phpize && ./configure --enable-debug && TESTS=-q make test install

# rsyslog日志采集器配置
echo ':programname,isequal,"asynclog" /var/log/asynclog.log' > /etc/rsyslog.d/20-asynclog.conf
# 重启rsyslogd服务
sudo service rsyslog restart

# 监控调试日志
tailf /var/log/asynclog.log | sed 's|#012|\n|g'

php.ini配置

; 日志存储方式: ASYNCLOG_MODE_FILE, ASYNCLOG_MODE_REDIS, ASYNCLOG_MODE_ELASTIC
asynclog.mode =           ASYNCLOG_MODE_FILE
; 日志级别: ASYNCLOG_LEVEL_ALL = PHP_ASYNCLOG_LEVEL_ERROR | PHP_ASYNCLOG_LEVEL_WARN | PHP_ASYNCLOG_LEVEL_INFO | PHP_ASYNCLOG_LEVEL_DEBUG | PHP_ASYNCLOG_LEVEL_VERBOSE
asynclog.level =          ASYNCLOG_LEVEL_ALL
; 文件路径
asynclog.filepath =     "/var/log/asynclog/"
; Redis主机名或IP
asynclog.redis_host =            "127.0.0.1"
; Redis端口号
asynclog.redis_port =                   6379
; Redis认证密码
asynclog.redis_auth =                     ""
; Elastic搜索引擎URL地址
asynclog.elastic =   "http://127.0.0.1:9200"
; shm共享统计数据使用的path和id
asynclog.ftok_path =     "/var/log/asynclog"
asynclog.ftok_id =       "/var/log/asynclog"

asynclog's People

Contributors

talent518 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

ajunlonglive

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.