PHPackages                             epii/log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. epii/log

ActiveLibrary

epii/log
========

简单的日志记录，支持 直接输出,文件记录，远程接口，socket 方式

0.0.8(6y ago)1591MITPHPPHP &gt;=5.3

Since May 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/epaii/epii-php-log)[ Packagist](https://packagist.org/packages/epii/log)[ RSS](/packages/epii-log/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (8)DependenciesVersions (9)Used By (1)

Epii\_php\_Log (php 的应用日志服务)
----------------------------

[](#epii_php_log-php-的应用日志服务)

目前支持

- 通过直接打印查看日志 EchoDriver
- 通过写入文件记录日志 FileDriver
- 通过请求接口向远端存储日志 ApiDriver
- 可扩展自己的日志记录方式，只需实现 接口IDriver即可

### 一，通过直接打印查看日志

[](#一通过直接打印查看日志)

*使用方法*

```
//初始化(全局有效)
use epii\log\EpiiLog;
EpiiLog::setDebug(true); //开启debug 参数 true为开启 false为关闭
EpiiLog::setLevel(EpiiLog::LEVEL_NOTICE); //设置级别 该级别下不报错
EpiiLog::setDriver((new \epii\log\driver\EchoDriver()); //选择Echo模式
//打印日志
EpiiLog::error($object); //支持不同的日志级别 这里仅以error示例
```

### 二，通过写入文件记录日志

[](#二通过写入文件记录日志)

*使用方法*

```
//初始化(全局有效)
use epii\log\EpiiLog;
EpiiLog::setDebug(true); //开启debug 参数 true为开启 false为关闭
EpiiLog::setLevel(EpiiLog::LEVEL_NOTICE); //设置级别 该级别下不报错
EpiiLog::setDriver((new \epii\log\driver\FileDriver('./logs/')); //选择File模式，FileDriver初始化中传入需要存放日志的目录
//写入日志
EpiiLog::error($object); //支持不同的日志级别 这里仅以error示例
```

### 三，通过请求接口向远端存储日志

[](#三通过请求接口向远端存储日志)

*使用方法*

```
//初始化(全局有效)
use epii\log\EpiiLog;
EpiiLog::setDebug(true); //开启debug 参数 true为开启 false为关闭
EpiiLog::setLevel(EpiiLog::LEVEL_NOTICE); //设置级别 该级别下不报错
EpiiLog::setDriver((new \epii\log\driver\ApiDriver('http://api.log.wszx.cc/?app=getlog@get',array $data)); //选择Api模式，第一个参数为要远端存储所需要请求的url地址；第二个参数为需要传输的数据(array)
//发起请求
EpiiLog::error($object); //支持不同的日志级别 这里仅以error示例
```

### 四，日志类型

[](#四日志类型)

*使用方法*

```
EpiiLog::warn($object);
EpiiLog::info($object);
EpiiLog::notice($object);
EpiiLog::debug($object);
EpiiLog::error($object);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~2 days

Total

8

Last Release

2499d ago

PHP version history (3 changes)0.0.1PHP 7.0

0.0.2PHP &gt;=7.0

0.0.8PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fe8c6a6a5b64efc9fcda02b7fe3b660d0da22ea26ea627cbba9e5466779198c?d=identicon)[epii](/maintainers/epii)

---

Top Contributors

[![songyangphp](https://avatars.githubusercontent.com/u/30816362?v=4)](https://github.com/songyangphp "songyangphp (25 commits)")[![epaii](https://avatars.githubusercontent.com/u/15167976?v=4)](https://github.com/epaii "epaii (17 commits)")

### Embed Badge

![Health badge](/badges/epii-log/health.svg)

```
[![Health](https://phpackages.com/badges/epii-log/health.svg)](https://phpackages.com/packages/epii-log)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
