PHPackages                             krysvac/clogger - 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. krysvac/clogger

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

krysvac/clogger
===============

A class that logs your errors to files

v1.0(9y ago)019MITPHP

Since May 15Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

CLogger
=======

[](#clogger)

A simple class that logs your errors to files.

How to install
--------------

[](#how-to-install)

This repo is avaiable through packagist with the command:

```
composer require krysvac/clogger

```

How to use
----------

[](#how-to-use)

You will need to call these static functions to initialize the class.

```
// A folder called 'log' will be created in your output folder.
// This is where all the files will be created in.
CLogger::setOutputDir("/path/to/your/output/folder");

// Initializes class
CLogger::init();
```

This CLogger class uses [set\_error\_handler()](http://php.net/manual/en/function.set-error-handler.php) to write the errors on the file. It's recommended to initialize the class as early as possible

Once initialized, all errors will be written to a file To trigger an error use [trigger\_error()](http://php.net/manual/en/function.trigger-error.php).

```
trigger_error("This is a warning!", E_USER_WARNING);
```

Also note that this function will not use [error\_reporting()](http://php.net/manual/en/function.error-reporting.php) to set which errors to display, instead you need to set it yourself.
Example:

```
error_reporting(E_ALL);
CLogger::init();
```

License
-------

[](#license)

This code is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

[![Build Status](https://camo.githubusercontent.com/03b081f50e85b0401082c85ffc284d46c114bbc1e7d6fde9e291834866e00218/68747470733a2f2f7472617669732d63692e6f72672f6b7279737661632f434c6f676765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/krysvac/CLogger)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a3371553c5b0fbd5787f1b7b9689cdc4a08b526bf33ac85f910c69b76c30daaf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b7279737661632f434c6f676765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/krysvac/CLogger/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/f8e329f9bc0354fab51703544833bfd075d6f651c1c6c53a60c555e05d3fa17e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b7279737661632f434c6f676765722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/krysvac/CLogger/?branch=master)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3645d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c4faf834b428b1f8696d276cbc20b9e62850b905c46385dc6a1a9cd7adb91e?d=identicon)[krysvac](/maintainers/krysvac)

---

Top Contributors

[![krysvac](https://avatars.githubusercontent.com/u/1573215?v=4)](https://github.com/krysvac "krysvac (15 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

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

php dev tools in your browser

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

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

41838.2M136](/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)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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