0%

  1. 下载SeasLog

     wget http://pecl.php.net/get/SeasLog-1.7.6.tgz
  2. 解压并进入解压后的文件夹

     tar -axvf SeasLog-1.7.6.tgz
     cd SeasLog-1.7.6/
  3. 加入SeasLog扩展模块到php

     phpize
  4. 检查安装配置:

     ./configure --with-php-config=/usr/local/php/bin/php-config
  5. 编译、安装

     make
     make install 
  6. 在php.ini中配置SeasLog:

     [SeasLog] 
     extension = seaslog.so
    
     seaslog.default_basepath = "/var/log/www"
    
     seaslog.default_logger = "default"
    
     seaslog.default_datetime_format = "Y-m-d H:i:s"
    
     seaslog.default_template = "%T | %L | %P | %Q | %t | %M"
    
     seaslog.disting_type = 1
    
     seaslog.disting_by_hour = 1
    
     seaslog.use_buffer = 1
    
     seaslog.buffer_size = 100
  7. 重启php

     sudo killall php-fpm
     sudo php-fpm
  8. 检查是否已经生效

     php -i|grep seaslog