php 之 日志系统seaslog安装
php 之 日志系统seaslog
特点:
1、高性能(使用C语言编写的)。
2、无需配置。
3、功能完善、使用简单。
安装:
打开php的扩展官网:https://pecl.php.net/。
然后搜索Seaslog,
选择最新的版本下载:
wget https://pecl.php.net/get/SeasLog-1.8.4.tgz
解压:
tar zxvf SeasLog-1.8..tgz
然后进入SeasLog目录
cd SeasLog-1.8./
然后执行phpize:
关于什么是phpize,参考博客:https://blog.csdn.net/qq_16399991/article/details/70577740。
phpize
如果显示命令未找到:
就先安装php-dev:
sudo apt-get install php5-dev
下一步,执行configure:
./configure
如果报错,显示命令未找到php-config,就需要添加自己的php路径:
./configure -- with-php-config=/usr/local/php/bin/php-config
下一步:
sudo make && make install
如果提示目录没有权限,就修改指定目录的权限。
安装结果:
See any operating system documentation about shared libraries for
more information, such as the ld() and ld.so() manual pages.
---------------------------------------------------------------------- Build complete.
Don't forget to run 'make test'. Installing shared extensions:
进入目录查看:
cd /usr/lib/php5//
可以看到:seaslog.so。
然后修改php.ini文件。
如果不知道php.ini文件在哪,可以通过phpinfo查看。
Nginx:
Loaded Configuration File /etc/php5/fpm/php.ini
apache:
Loaded Configuration File /etc/php5/apache2
打开php.ini,增加一行:
extension = "seaslog.so"
然后重启nginx服务或apache服务,再查看phpinfo,就可以看到安装成功。
打开Seaslog的github:https://github.com/SeasX/SeasLog。
找到Seaslog.ini,复制内容到php.ini中。
;configuration for php SeasLog module
extension = seaslog.so ;Default Log Base Path
seaslog.default_basepath = "/var/log/www" ;Default Logger Path
seaslog.default_logger = "default" ;The DateTime Style. Default "Y-m-d H:i:s"
seaslog.default_datetime_format = "Y-m-d H:i:s" ;Default Log template.
;Default "%T | %L | %P | %Q | %t | %M"
seaslog.default_template = "%T | %L | %P | %Q | %t | %M" ;Switch use the logger with folder.
;-Y(Default) -N
seaslog.disting_folder = ;Switch use the logger with type.
;-Y -N(Default)
seaslog.disting_type = ;Switch use the logger with hour.
;-Y -N(Default)
seaslog.disting_by_hour = ;Switch use the log buffer with memory.
;-Y -N(Default)
seaslog.use_buffer = ;The buffer size
seaslog.buffer_size = ;disable buffer in cli
;-Y -N(Default)
seaslog.buffer_disabled_in_cli = ;Record logger level.
;-EMERGENCY -ALERT -CRITICAL -ERROR -WARNING -NOTICE -INFO -DEBUG -ALL
;Default (All of them).
;
; Tips: The configuration item has changed since the 1.7. version.
; Before the 1.7. version, the smaller the value, the more logs are taken according to the level:
; -all -debug -info -notice -warning -error -critical -alert -emergency
; Before the 1.7. version, Default (All of them).
seaslog.level = ;Log function recall depth
;Will affected variable `LineNo` in `%F`
;Default
seaslog.recall_depth = ;Automatic Record notice with default logger
;-Y -N(Default)
seaslog.trace_notice = ;Automatic Record warning with default logger
;-Y -N(Default)
seaslog.trace_warning = ;Automatic Record final error with default logger.
;-Y(Default) -N
seaslog.trace_error = ;Automatic Record exception with default logger.
;-Y -N(Default)
seaslog.trace_exception = ;Switch the Record Log Data Store.
;1File 2TCP 3UDP (Switch default )
seaslog.appender = ;Record Log Retry Count
;Default (Do Not Retry)
seaslog.appender_retry = ;If you use Record TCP or UDP, configure this remote ip.
;Default "127.0.0.1"
seaslog.remote_host = "127.0.0.1" ;If you use Record TCP or UDP, configure this remote port.
;Default
seaslog.remote_port = ;If you use Record TCP or UDP, configure this remote timeout.
;Default second
seaslog.remote_timeout = ;Trim the \n and \r in log message.
;-On -Off(Default)
seaslog.trim_wrap = ;Switch throw SeasLog exception.
;-On(Default) -Off
seaslog.throw_exception = ;Switch ignore SeasLog warning.
;-On(Default) -Off
seaslog.ignore_warning =
php 之 日志系统seaslog安装的更多相关文章
- php的高性能日志系统 seaslog 的安装与使用
一.什么是日志系统 一般用于记录系统运行时的信息,一般分为三类:系统日志,应用程序日志,安全日志.日志功能不能影响用户的正常使用. 二.为什么需要日志功能 1.了解系统运行情况 2. ...
- PHP扩展高性能日志系统SeasLog简单上手
Windows部分:-------------------------------------------------------- https://pecl.php.net/package/Seas ...
- kubernetes集群EFK日志系统搭建
日志收集架构 Kubernetes 集群本身不提供日志收集的解决方案,一般来说有主要的3种方案来做日志收集: 在节点上运行一个 agent 来收集日志 在 Pod 中包含一个 sidecar 容器来收 ...
- 【树莓派2B倒腾日志】之安装系统及配置
15号树莓派到手到现在,折腾了也有一小周,自己摸索着,装了系统,登上SSH,更新了源,连了VNC,换上wifi,亮了小灯.再到今天捣鼓了下数码管,回头想想,该写个日志记录一下这一周的所得,自己总结也方 ...
- 分布式实时日志系统(一)环境搭建之 Jstorm 集群搭建过程/Jstorm集群一键安装部署
最近公司业务数据量越来越大,以前的基于消息队列的日志系统越来越难以满足目前的业务量,表现为消息积压,日志延迟,日志存储日期过短,所以,我们开始着手要重新设计这块,业界已经有了比较成熟的流程,即基于流式 ...
- 高性能PHP日志插件--Seaslog
日志系统作为记录系统运行的信息,包括 用户输入,安全日志等,日志系统是不能影响用户的使用. 为什么需要记录日志? 既然日志系统增加了整个系统的开销,为什么我还需要它,这是因为日志能帮我们记录运行的很多 ...
- 如何在win7系统中安装redis
转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/92.html?1455871954 如何在win7系统中安装redis ...
- DNS主从服务,子域授权,view视图,日志系统,压力测试
DNS主从服务,子域授权,view视图,日志系统,压力测试 DNS性能测试工具queryperfDNS查询过程: DNS主从建立: 环境: 主服务器:10.140.165.93 从服务器:10.140 ...
- 使用SharePoint Designer定制开发员工工作日志系统实例!
昨天已介绍了一篇<使用SharePoint Designer定制开发专家库系统实例!>,今天继续来介绍使用SharePoint Designer定制开发员工工作日志系统实例,主要功能包括填 ...
随机推荐
- P1967 货车运输 未完成
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #inclu ...
- DMA简介
直接存储器访问 直接存储器访问(Direct Memory Access,DMA)是计算机科学中的一种内存访问技术.它可以让外设可以独立地直接读写系统存储器,而不需绕道中央处理器(CPU),DMA是一 ...
- DDR SDRAM
DDR SDRAM(Double Data Rate SDRAM)是一种高速CMOS.动态随机访问存储器, 它采用双倍数据速率结构来完成高速操作.应用在高速信号处理系统中, 需要缓存高速.大量的数据的 ...
- qt project settings被禁用解决方案
转载请注明出处:http://www.cnblogs.com/dachen408/p/7422707.html qt project settings被禁用点击不了: 解决方案:需要点击该项目(或者项 ...
- 1《数学之美》第1章 文字和语言 vs 数字和信息
1<数学之美>第1章 文字和语言 vs 数字和信息
- SQLite – HAVING 子句
SQLite – HAVING子句 HAVING使您能够指定过滤条件哪一组结果出现在最终的结果. WHERE子句的地方条件选定的列, 在有HAVING 子句的地方 就有GROUP BY子句包含的条件组 ...
- Linux-RedHat7.2 安装nginx托管.net core2.0
1.安装依赖包 yum -y install gcc gcc-c++ pcre pcre-devel openssl openssl-devel zlib zlib-devel 2.下载安装包 wge ...
- java 随机数 <%=System.currentTimeMillis() %>
java 随机数<c:set var="version" value="<%=System.currentTimeMillis() %>"/& ...
- QT+创建两个不相干的窗口实现一个显示一个不显示
因为两个窗口互不相干,所以需要重新创建一个窗口类subWidget subWidget.cpp文件 #ifndef SUBWIDGET_H #define SUBWIDGET_H #include & ...
- 全志T8智能汽车方案芯片参数介绍
T8处理器代表了Allwinner在智能汽车市场上的最新成就.T8适用于需要三维图形.高级视频处理.精密相机.多种连接选项和高水平系统集成的应用程序.它将把先进的消费电子体验带入未来的汽车,实现高性能 ...