PHPackages                             orz/plog - 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. orz/plog

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

orz/plog
========

PSR3 logging library that is PDO extendable and simple to use

v0.1.1-stable(4y ago)0181MITPHPPHP &gt;=7.0

Since Apr 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/huanguan1978/plog)[ Packagist](https://packagist.org/packages/orz/plog)[ Docs](https://github.com/huanguan1978)[ RSS](/packages/orz-plog/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

plog
====

[](#plog)

PSR-3 logging library that is PDO extendable and simple to use

#### Features

[](#features)

- single file
- singleton pattern
- six log levels (info, notice, debug, warning, error, fatal)
- `Plogger`, dsn support mysql, pgsql, sqlsrv, sqlite.

TextLog Basic Usage
-------------------

[](#textlog-basic-usage)

```
use Plog\Tlogger;
$tlog = Tlogger::getInstance();
$tlog->info('HelloWorld');
$tlog->debug("I'mHere",['data'=>['123','456']]);
```

TextLog Output
--------------

[](#textlog-output)

```
[2022-04-16 16:43:08] [test2.localhost.localdomain/xz/plog/demo.php] [12] : [INFO] - HelloWorld
[2022-04-16 16:43:08] [test2.localhost.localdomain/xz/plog/demo.php] [13] : [DEBUG] - I'mHere {"data":["123","456"]}

```

PdoLog Basic Usage
------------------

[](#pdolog-basic-usage)

```
use Plog\Plogger;
$dbtype = 'sqlite';
$dbname = 'plog.db';
$dbtable = 'plog';
$dsn = sprintf("%s:%s", $dbtype, $dbname);
$plnk = new PDO($dsn);
$plog = Plogger::getInstance();
$plog->dblink($plnk);
$plog->dbtype($dbtype);
$plog->dbtable($dbtable, true);
$plog->info('HelloWorld');
$plog->debug("I'mHere",['data'=>['123','456',"I'm"]]);
```

PdoLog Output
-------------

[](#pdolog-output)

```
SELECT * FROM plog;
```

**id****time****path****line****severity****message****context**12022-04-16 16:29:30test2.localhost.localdomain/xz/plog/demo.php25INFOHelloWorld22022-04-16 16:29:30test2.localhost.localdomain/xz/plog/demo.php26DEBUGImHere{"data":\["123","456","I\\u0027m"\]}Installation
------------

[](#installation)

Install the latest version with:

```
$ composer require orz/plog
```

Usage without composer
----------------------

[](#usage-without-composer)

[Download ZIP](https://github.com/huanguan1978/plog/archive/refs/heads/main.zip) See demo2.php.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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 ~4 days

Total

3

Last Release

1484d ago

### Community

Maintainers

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

---

Top Contributors

[![huanguan1978](https://avatars.githubusercontent.com/u/111476?v=4)](https://github.com/huanguan1978 "huanguan1978 (16 commits)")

---

Tags

psr-3phploggingmonitoringpdoerrorserror-monitoringloggersyslogstderr

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[atrapalo/monolog-elasticsearch

A Monolog handler and formatter that makes use of the elasticsearch/elasticsearch package

1123.0k](/packages/atrapalo-monolog-elasticsearch)

PHPackages © 2026

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