PHPackages                             clog/clog - 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. clog/clog

ActiveLibrary

clog/clog
=========

1.0.1(5y ago)05PHP

Since Sep 27Pushed 4y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

Common Logger for PHP
---------------------

[](#common-logger-for-php)

设置私有composer镜像源
---------------

[](#设置私有composer镜像源)

```
composer config repo.packagist composer http://composer.xxx.xxx
```

---

引入Clog composer包
----------------

[](#引入clog-composer包)

### 方法1

[](#方法1)

```
composer require clog/clog
```

### 方法2

[](#方法2)

```
  "require": {
    "clog/clog": "1.*"
  }
```

---

用例示范
----

[](#用例示范)

```
public function test_demo() {
        $env = "test";
        $caller = "Clogtest";
        $clog = \Clog\Clog::ins($env, $caller);

        // 添加日志记录
        $testdata = [
           "msg" => "错误",
           "err_code" => 10000,
           "time_stamp" => time(),
           "extra" => ""
        ];
        $r = $clog->Log($testdata, "ERROR");
        $this->assertTrue($r);
    }
```

msg需要被记录的信息，以数组传递 "INFO" 日志级别 默认INFO （"DEBUG","INFO"，"NOTICE"，"WARNING"，"ERROR"，"CRITICAL"，"ALERT"，"EMERGENCY"）

---

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

2051d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13e0aa482786974ddb08e99bbfe6ceebfd37a35888cfb4d1a43e46abf8546684?d=identicon)[dongshanli](/maintainers/dongshanli)

---

Top Contributors

[![lidongshan](https://avatars.githubusercontent.com/u/17975482?v=4)](https://github.com/lidongshan "lidongshan (5 commits)")

### Embed Badge

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

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

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k4](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.2k](/packages/drevops-git-artifact)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)

PHPackages © 2026

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