PHPackages                             firstphp/icelog - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. firstphp/icelog

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

firstphp/icelog
===============

公共日志服务

1.1(8y ago)0659↓50%MITPHPPHP &gt;=5.3.0

Since Mar 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lamplife/icelog)[ Packagist](https://packagist.org/packages/firstphp/icelog)[ RSS](/packages/firstphp-icelog/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

icelog
======

[](#icelog)

公共日志服务 for laravel

安装

```
composer require firstphp/icelog:"1.0"

```

数据迁移

```
拷贝迁移文件到指定目录: cp -R vendor/firstphp/icelog/src/Migrations/* database/migrations/

执行数据迁移命令: php artisan migrate
可能会报错，报错解决方法(详见文章 http://www.firstphp.com/archives/192.html)：
/project/app/Providers/AppServiceProvider.php 中boot()方法添加：Schema::defaultStringLength(191);

因为laravel自身的Schema无法构造联合表,故而在生成表后,需手动执行一下该SQL:
ALTER TABLE `user_log` ENGINE=MRG_MyISAM UNION=(user_log_201801,user_log_201802,user_log_201803,user_log_201804,user_log_201805,user_log_201806,user_log_201807,user_log_201808,user_log_201809,user_log_201810,user_log_201811,user_log_201812);

```

注册服务 编辑 config/app.php 文件, 在 providers 数组中添加如下: Firstphp\\Wechat\\Providers\\WechatServiceProvider::class,

示例代码

```
use Firstphp\Icelog\Facades\IcelogFactory;

......

添加日志:
    $data = [
        'user_id' => 1,
        'type' => 1,
        'source_id' => 1,
        'remark' => '描述内容201801',
        'original' => '原始内容11',
        'record' => '操作内容111',
    ];
    IcelogFactory::addlogs($data)

日志列表(支持分页):
    $offset = isset($this->params['offset']) && $this->params['offset'] ? $this->params['offset'] : 0;
    $limit = isset($this->params['limit']) && $this->params['limit'] ? $this->params['limit'] : 10;
    return IcelogFactory::getlogs($offset, $limit);

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec2904a42657def0df771f16258860306774a9a8de3e4b838816705c0c38fb43?d=identicon)[lamplife](/maintainers/lamplife)

---

Top Contributors

[![lamplife](https://avatars.githubusercontent.com/u/12744359?v=4)](https://github.com/lamplife "lamplife (3 commits)")

### Embed Badge

![Health badge](/badges/firstphp-icelog/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

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