PHPackages                             net\_bazzline/component\_psr\_and\_log4php\_adapter - 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. net\_bazzline/component\_psr\_and\_log4php\_adapter

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

net\_bazzline/component\_psr\_and\_log4php\_adapter
===================================================

php component psr logger log4php bridge Log4Php Logger Interface

2.0.0(9y ago)2190[1 issues](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter/issues)LGPLv3PHPPHP &gt;=5.3.3

Since Sep 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter)[ Packagist](https://packagist.org/packages/net_bazzline/component_psr_and_log4php_adapter)[ Docs](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter)[ RSS](/packages/net-bazzline-component-psr-and-log4php-adapter/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

PHP Psr And Log4Php Adapter Component
=====================================

[](#php-psr-and-log4php-adapter-component)

This component provides adapters for using Psr Logger in Log4Php Environment and vice versa.

The main idea is to easy up usage and/or migration of existing Log4Php application with/into [Psr loggers](https://github.com/php-fig/log).

The build status of the current master branch is tracked by Travis CI: [![Build Status](https://camo.githubusercontent.com/fb4df4f49983e87edacb933d5426ec09aed47f640c2d6507ab1184a41fcdafe9/68747470733a2f2f7472617669732d63692e6f72672f737465766c656962656c742f7068705f636f6d706f6e656e745f7073725f616e645f6c6f67347068705f616461707465722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/stevleibelt/php_component_psr_and_log4php_adapter)[![Latest stable](https://camo.githubusercontent.com/d0b2fb48a1a3d467db58449cc96dc6c09ed50d16a40c1bdb3b99d8051c2fe106/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65745f62617a7a6c696e652f636f6d706f6e656e745f7073725f616e645f6c6f67347068705f616461707465722e737667)](https://packagist.org/packages/net_bazzline/component_psr_and_log4php_adapter)

The scrutinizer status are: [![code quality](https://camo.githubusercontent.com/85e294b3cc6f858a31f46d563dafff34c286b97a1c32da4c6e296a6f8973fcde/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737465766c656962656c742f7068705f636f6d706f6e656e745f7073725f616e645f6c6f67347068705f616461707465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stevleibelt/php_component_psr_and_log4php_adapter/) | [![build status](https://camo.githubusercontent.com/f999ec2d3e3246d154e162dddf86ef60574450514f83c1a36a92cfed3cd8eed3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737465766c656962656c742f7068705f636f6d706f6e656e745f7073725f616e645f6c6f67347068705f616461707465722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stevleibelt/php_component_psr_and_log4php_adapter/)

@todo The versioneye status is: [![Dependency Status](https://camo.githubusercontent.com/6128c6e38bd3892cd459cd0624f4e4a19e42f4416a9f43675f794f29ecdfeff0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535333934313536306232343232356566363030303030322f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/553941560b24225ef6000002)

@todo Take a look on [openhub.net](https://www.openhub.net/p/component_psr_and_log4php_adapter).

Features
========

[](#features)

- Log4Php to Psr Logger Bridge
- Psr Logger to Log4PhP Bridge

Example
=======

[](#example)

Use a psr-logger in a Log4Php
-----------------------------

[](#use-a-psr-logger-in-a-log4php)

```
$adapter = new \Net\Bazzline\Component\PsrAndLog4PhpAdapter\Log4PhpToPsrAdapter('your name');
$adapter->injectPsrLogger($psrLoggerInstance);
$adapter->debug('my debug log');
```

Use a Log4Php in a psr-logger
-----------------------------

[](#use-a-log4php-in-a-psr-logger)

```
$adapter = new \Net\Bazzline\Component\PsrAndLog4PhpAdapter\PsrToLog4PhpAdapter($log4PhpInstance);
$adapter->debug('my debug log');
```

Installation
============

[](#installation)

[GitHub](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter)
------------------------------------------------------------------------------

[](#github)

```
mkdir vendor/net_bazzline/php_component_psr_and_log4php_adapter
cd vendor/net_bazzline/php_component_psr_and_log4php_adapter
git clone https://github.com/stevleibelt/php_component_psr_and_log4php_adapter .

```

[Composer](https://packagist.org/packages/net_bazzline/component_psr_and_log4php_adapter)
-----------------------------------------------------------------------------------------

[](#composer)

```
require: "net_bazzline/component_psr_and_log4php_adapter": "dev-master"

```

Notes
=====

[](#notes)

- throwable are currently ignored in Log4PhpToPsrAdapter::log()
- context is currently ignored in PsrToLog4PhpAdapter::log()

Licence
=======

[](#licence)

This software is licenced under [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/copyleft/lesser.html). The full licence text is shipped [within](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter/blob/master/LICENSE) this component package.

Version History
===============

[](#version-history)

- upcoming
    - @todo
        - add versioneye dependecy status
        - add link to openhub
        - fixed typos in the readme
        - implement conversion of throwable into something in Log4PhpToPsrAdapter::log()
        - implement conversion of context into something in PsrToLog4PhpAdapter
    - added travis build status
    - added scrutinizer build status
- [2.0.0](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter/tree/2.0.0)
    - added example
    - added version boundary to psr log and log4php
    - covered code with unit tests
    - moved injected logger from protected to private
    - moved to psr-4 autoloading
    - refactored loggers and the way how to inject the logger you want to bridge
    - removed Log4PhpLoggerInterface since this simple complicates stuff
- [1.0.0](https://github.com/stevleibelt/php_component_psr_and_log4php_adapter/tree/1.0.0)
    - Log4Php Logger Interface
    - Log4Php to Psr Logger Bridge
    - Psr Logger to Log4PhP Bridge

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3457d ago

Major Versions

1.0.0 → 2.0.02017-02-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/58451b041f6f5a38c7e62762c96d01f5e2bcac30e322707fe4760a82bccb6856?d=identicon)[artodeto](/maintainers/artodeto)

---

Top Contributors

[![stevleibelt](https://avatars.githubusercontent.com/u/2287220?v=4)](https://github.com/stevleibelt "stevleibelt (19 commits)")

---

Tags

logpsr-3phploggingadapterloggercomponentlog4phpnet\_bazzlineLog4Php Logger Interface

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/net-bazzline-component-psr-and-log4php-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/net-bazzline-component-psr-and-log4php-adapter/health.svg)](https://phpackages.com/packages/net-bazzline-component-psr-and-log4php-adapter)
```

###  Alternatives

[markrogoyski/simplelog-php

Powerful PSR-3 logging. So easy, it's simple.

2819.5k4](/packages/markrogoyski-simplelog-php)

PHPackages © 2026

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