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定制开发员工工作日志系统实例,主要功能包括填 ...
随机推荐
- How to proxy a web site by apache2 in Ubuntu
Install apache2 To execute the install command in terminal: sudo apt-get install apache2 Then, we ca ...
- 在SQLServer使用触发器实现数据完整性
1.实现数据完整性的手段 在sqlserver中,在服务器端实现数据完整性主要有两种手段:一种是在创建表时定义数据完整性,主要分为:实体完整性.域完整性.和级联参照完整性:实现的手段是创建主键约束.唯 ...
- 自定义Jquery 下拉框
(function ($){ 'use strict'; var g_id = 0; var g_open_id = []; $.fn.select3 = function () { var _id ...
- AIX 11203 ASM RAC安装
1:查看系统版本 [rac1:root:/hacmp/hacmp5.4/ha5.4/installp/ppc] oslevel -s 6100-06-06-1140 lslpp -al bos.adt ...
- vue-gemini-scrollbar(vue组件-自定义滚动条)
vue-gemini-scrollbar(vue组件-自定义滚动条) https://segmentfault.com/a/1190000013338560
- dockerfile 的最佳实践
Dockerfile 编写nginx容器 [root@mast nginx]# cat Dockerfile FROM centos MAINTAINER zhaoruidong RUN yum -y ...
- Java中System.setProperty()用法
/* * 设置指定键对值的系统属性 * setProperty (String prop, String value); * * 参数: * prop - 系统属性的名称. * value ...
- 测试常用的linux命令
一.系统 1.halt: 关机 poweroff: 关机 2.reboot: 重启 二.处理目录和文件的命令 1.ll: 显示文件详细信息 ls: 显示文件目 ...
- Qt_为什么学习Qt
1)学习GUI编程,市场上任何一款产品几乎都带有图形界面,市场上很火的Androoid.IOS编程无非也是GUI app编程,GUI编程都是差不多的,学习Qt后再学习ANdroid IOS ,那都是S ...
- 光猫&路由器网络配置
前期准备:电脑(工业电脑).网线.光猫.路由器 1.检查连接光猫后能否正常上网:把网线两头的水晶头,一头插在光猫上的千兆口,一头插在电脑(工业电脑)的网口上,看电脑能否正常上网: 可以正常上网:说明光 ...