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定制开发员工工作日志系统实例,主要功能包括填 ...
随机推荐
- Android自定义zxing扫描界面的实现
首先,我们需要导入zxing的jar文件,其次复制所需要的资源文件以及放入自己需要添加的资源文件,复制出源码的必要相关类文件.对布局文件进行一定的修改,再修改CaptureActivity与Viewf ...
- PMP项目管理学习笔记(10)——范围管理之收集需求
一个星期没看书,没记录笔记,没能坚持下来,感觉好罪过.现在我要重新上路! 收集需求 收集需求就是与项目的所有干系人坐在一起,得出他们的需求是什么,这就是收集需求过程中要做的事情.你的项目要想成功,你就 ...
- js获取服务器生成并返回客户端呈现给客户的控件id的方法
var repeaterId = '<%=rpData.ClientID %>'; //Repeater的客户端IDvar rows = <%=rpData.Items.Count% ...
- JDBC ResultSet分析
JDBC1.0 .JDBC2.0 .JDBC3.0 中分别用以下方法创建Statement . JDBC1.0 : createStatement() JDBC2.0 : createStatemen ...
- help命令
help——获得Shell内置命令的帮助信息 命令所在路径:Shell内置命令 示例1: # help cd 使用which或者whereis查找不到路径的命令一般是Shell内置命令,cd就是一个S ...
- (转)配置Spring管理的bean的作用域
http://blog.csdn.net/yerenyuan_pku/article/details/52833477 Spring管理的bean的作用域有: singleton 在每个Spring ...
- laravel composer 扩展包开发(超详细)
laravel composer 扩展包开发(超详细) 置顶 2018年02月05日 11:09:16 Simael__Aex 阅读数:10396 版权声明:转载请注明出处:http://blo ...
- dumpkeys - 转储显示键盘翻译表
总览 (SYNOPSIS) dumpkeys [ -hilfn1 -Sshape -ccharset --help --short-info --long-info --numeric --full- ...
- gitlab利用ssh方式拉取代码
问题1: Bad owner or permissions on .ssh/config的解决 当为本机配一个固定用户名远程登录某主机时,配置了一个config文件,但是在执行ssh免密码登录时报如下 ...
- https://www.runoob.com/python/python-variable-types.html
https://www.runoob.com/python/python-variable-types.html