PHPackages                             myena/default-logger - 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. myena/default-logger

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

myena/default-logger
====================

A simple PSR-3 compliant logger

1.1.2(8y ago)11.3k1MPL-2.0PHPPHP &gt;=5.6

Since Feb 9Pushed 3y ago4 watchersCompare

[ Source](https://github.com/myENA/default-psr-logger)[ Packagist](https://packagist.org/packages/myena/default-logger)[ RSS](/packages/myena-default-logger/feed)WikiDiscussions master Synced 1mo ago

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

default-psr-logger
==================

[](#default-psr-logger)

A simple PSR-3 compliant logger

[![Build Status](https://camo.githubusercontent.com/6ad759d2b3868c7cb8bce9745d191eef26d07c2fafdb61ef18adc3e35459534c/68747470733a2f2f7472617669732d63692e6f72672f6d79454e412f64656661756c742d7073722d6c6f676765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/myENA/default-psr-logger)

Installation
------------

[](#installation)

This library is designed to be used with [Composer](https://getcomposer.org)

Require entry:

```
{
    "myena/default-logger": "@stable"
}
```

Basic Usage
-----------

[](#basic-usage)

```
$logger = new \MyENA\DefaultLogger();

$logger->debug('hello!');
```

Defaults
--------

[](#defaults)

The default level of this logger is `debug`

The default stream for this logger is `php://output`

Custom Levels
-------------

[](#custom-levels)

You may specify custom levels one of two ways:

**Construction**:

```
$logger = new \MyENA\DefaultLogger(\Psr\Log\LogLevel::INFO);
```

**Post-Construction**:

```
$logger->setLogLevel(\Psr\Log\LogLevel::INFO);
```

If you attempt to specify a level not denoted by [\\Psr\\Log\\LogLevel](https://github.com/php-fig/log/blob/1.0.2/Psr/Log/LogLevel.php), an exception will be thrown.

Custom Stream
-------------

[](#custom-stream)

If you wish for the log output to go to a file or some other resource writeable by the [fwrite](http://php.net/manual/en/function.fwrite.php) function, you may pass it in as the 2nd argument.

```
$logger = new \MyENA\DefaultLogger(\Psr\Log\LogLevel::DEBUG, fopen('tmp/test.log', 'ab'));
```

If this file becomes un-writeable for some reason, it will attempt to reconstruct the internal resource. If it is unable, it will revert to using the stream returned by the [defaultStream()](./src/DefaultLogger.php#L145).

**NOTE**: No write-ability determination is done, if you pass in a read-only stream it will ultimately not work.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

2981d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/385c0c0eae1b51f1e81ee464ff6bfb3cce32589ac252ca68cc3a8aec2e3ada14?d=identicon)[dcarbone](/maintainers/dcarbone)

---

Top Contributors

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

---

Tags

logloggerloggingphppsr-3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/myena-default-logger/health.svg)

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M271](/packages/sentry-sentry)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M81](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M517](/packages/illuminate-log)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2222.9M248](/packages/open-telemetry-sdk)[open-telemetry/api

API for OpenTelemetry PHP.

1833.0M214](/packages/open-telemetry-api)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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