lyzy / slog
php log helper for seaslog
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:seaslog-extension
Requires
- php: >=5.6.0
This package is not auto-updated.
Last update: 2025-06-22 07:11:45 UTC
README
php_log_helper for SeasLog
首先需要 安装 和 配置 SeasLog扩展
详细参考 官方文档
编译安装 SeasLog
$ /path/to/phpize
$ ./configure --with-php-config=/path/to/php-config
$ make && make install
PECL安装SeasLog
$ pecl install seaslog
Windows环境中使用SeasLog
到PECL/SeasLog主页找到对应的dll进行安装 PECL/SeasLog Windows Dll
安装php log helper for SeasLog
composer require lyzy/slog
使用
tips:本扩展包也可以当成SeasLog扩展编辑器语法提示使用
<?php use lyzy\SLog; require_once "vendor/autoload.php"; SLog::log(SEASLOG_ERROR,'this is a error test by ::log'); SLog::debug('this is a {userName} debug',array('{userName}' => 'neeke')); SLog::info('this is a info log'); SLog::notice('this is a notice log'); SLog::warning('your {website} was down,please {action} it ASAP!',array('{website}' => 'github.com','{action}' => 'rboot')); SLog::error('a error log'); SLog::critical('some thing was critical'); SLog::alert('yes this is a {messageName}',array('{messageName}' => 'alertMSG')); SLog::emergency('Just now, the house next door was completely burnt out! {note}',array('{note}' => 'it`s a joke'));