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

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

jejd14/clog
===========

A small class for logging information about classes and methods

07HTML

Since May 10Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/698ca13b18f7ef903cbbe347b11e02b3f378ae4e4d1649d2bc49f3e2d66949c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f434c6f672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CLog/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/dc2a9483d209340fbe63c5ae58b27b513071063885919f0e9e9143221b3c8e6c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f434c6f672f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CLog/?branch=master) [![Build Status](https://camo.githubusercontent.com/5f4f73b2ab865e2a59268c9d13a13d20225301e3661300b318affda6069ff2b0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f434c6f672f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CLog/build-status/master)[![License](https://camo.githubusercontent.com/a1a4c55193cece85cadc110ad4c89685a9c8fd55dd4fc57c6cfc68e6a69310f5/68747470733a2f2f706f7365722e707567782e6f72672f646c69642f63646279756d6c2f6c6963656e73652e737667)](https://packagist.org/packages/jejd14/clog)

CLog
====

[](#clog)

About
-----

[](#about)

A small class for logging information about classes and methods

\##PHP Version

```
PHP >= 5.4.0
Tested on Anax-MVC >= 2.0.4
```

Introduction
------------

[](#introduction)

**Instantiate an object of CLog:**

```
$newClog = new \jejd14\clog\Clog();
```

**Or instantiate an object of CLog as a shared service within the [Anax](https://github.com/mosbth/Anax-MVC) framework:**

```
$di->setShared('log', function() {
    $log = new \jejd14\clog\CLog();
    return $log;
});
```

Methods
-------

[](#methods)

1. timestamp ( $domain, $where, $comment = null) - *Log a event with a time.*
2. timestampAsTable () - *Print all timestamps to a table.*
3. pageLoadTime() - *Print page per load time.*
4. memoryPeak() - *Print memory peak.*

Calling of Methods
------------------

[](#calling-of-methods)

To properly use the method timestamp listed above you can call it as follows (Assuming you've set the service as a shared service in your frontcontroller)

**Inside a class that extends/implements/uses \\Anax\\DI\\TInjectionAware:**

```
$this->di->log->timestamp(__CLASS__, __METHOD__, "A breif comment");
```

**In your frontcontroller:**

```
$app->log->timestamp(__CLASS__, __METHOD__, "A breif comment");
```

[CLASS](http://php.net/manual/en/language.constants.predefined.php) and [METHOD](http://php.net/manual/en/language.constants.predefined.php) are magic constants in PHP.

**To get all the timestamps as a table:**

```
$table = $app->log->timestampAsTable();
```

Composer
--------

[](#composer)

You can add [clog](https://packagist.org/packages/jejd14/clog) to your composer.json file like this.

```
"require": {
  "jejd14/clog": "dev-master"
 }
```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![JesperJohnsson](https://avatars.githubusercontent.com/u/9696528?v=4)](https://github.com/JesperJohnsson "JesperJohnsson (48 commits)")

### Embed Badge

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

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

###  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)
