PHPackages                             codeops/slim-phpconsole - 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. codeops/slim-phpconsole

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

codeops/slim-phpconsole
=======================

PHP-Console logging support for Slim Framework

0.1.1(10y ago)017MITPHPPHP &gt;=5.3.0

Since Jul 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/CodeOps/SlimPHPConsole)[ Packagist](https://packagist.org/packages/codeops/slim-phpconsole)[ Docs](http://github.com/amenadiel/SlimPHPConsole)[ RSS](/packages/codeops-slim-phpconsole/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

SlimPHPConsole
==============

[](#slimphpconsole)

PHP-Console log writer for Slim Framework

[![Packagist](https://camo.githubusercontent.com/1b1a9465f4984f914441857c17f72dea0f1f99309e75e1bc58d740a472af5322/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f616d656e616469656c2f736c696d2d706870636f6e736f6c652e737667)](https://packagist.org/packages/amenadiel/slim-phpconsole)

Use this custom log writer to output [Slim Framework](http://www.slimframework.com/)'s log messages to your browser's console using [PHP-Console](https://github.com/barbushin/php-console).

### Installation

[](#installation)

Just add `amenadiel/slim-phpconsole` to your `composer.json` file in the require or require-dev sections:

```
{
    "require": {
        "amenadiel/slim-phpconsole":"~0.0.4"
    }
}

```

### Usage

[](#usage)

Instantiate the log writer. If you don't want to have the handler autostarted, pass `false` as a parameter, `true` is implied otherwise.

When the handler is started it will set itself as error and exception handler too, unless you set it otherwise.

```
    $logwriter = new \Amenadiel\SlimPHPConsole\PHPConsoleWriter(true);

    $app = new \Slim\Slim(array(
        'log.enabled' => true,
        'log.level' => \Slim\Log::DEBUG,
        'log.writer' => $logwriter
    ));
```

Starting from version `0.0.6` this adapter extends Slim\\Middleware. Therefore, you can also use the `add` method of your app

```
    $app = new \Slim\Slim(array(
        'log.enabled' => true,
        'log.level' => \Slim\Log::DEBUG
    ));

    $app->add(new \Amenadiel\SlimPHPConsole\PHPConsoleWriter);
```

Both ways of setting PHP-Console as your logger are pretty much the same. Afterwards, you can send messages to your browser's console using `$app->log`'s methods.

```
    $app->log->debug('Debug called!');
    $app->log->info('This is just info');
    $app->log->warning('Heads Up! This is a warning');
```

You can pass custom tags to PHPConsole by using this adapter's `debug` method which forwards its parameters to PHPConsole's `debug` method.

```
    $app->log->getWriter()->debug('This has a custom tag', 'custom.tag');
```

If you are using PHPConsole directly somewhere else in your app, remember not to start it twice, for it will throw an exception. Use its `isStarted` method to check if it's already started.

```
    $myHandler = \PhpConsole\Handler::getInstance();

    if (!$myHandler->isStarted()) {
        $myHandler->start(); // Only start it if it hasn't been started yet
    }
```

### Optional Settings

[](#optional-settings)

You can use PHP-Console's configuration methods by getting a reference to the Handler instance or the Connector instance. For example:

```
   $logwriter = new \Amenadiel\SlimPHPConsole\PHPConsoleWriter(false);
   $handler = $logwriter->getHandler();
   $handler->setHandleErrors(false);  // disable errors handling, must be done before 'start' method
   $handler->start();

   $connector = $logwriter->getConnector();
   $connector->setPassword('macoy123'); //sets a very insecure passwd
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~31 days

Recently: every ~63 days

Total

9

Last Release

3719d ago

### Community

Maintainers

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

---

Top Contributors

[![ffflabs](https://avatars.githubusercontent.com/u/238439?v=4)](https://github.com/ffflabs "ffflabs (36 commits)")[![zz](https://avatars.githubusercontent.com/u/41499?v=4)](https://github.com/zz "zz (2 commits)")

---

Tags

middlewareloggingextensions

### Embed Badge

![Health badge](/badges/codeops-slim-phpconsole/health.svg)

```
[![Health](https://phpackages.com/badges/codeops-slim-phpconsole/health.svg)](https://phpackages.com/packages/codeops-slim-phpconsole)
```

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k964.9M7.0k](/packages/monolog-monolog)[symfony/monolog-bundle

Symfony MonologBundle

2.9k249.1M1.6k](/packages/symfony-monolog-bundle)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[flynsarmy/slim-monolog

Monolog logging support Slim Framework

114476.9k9](/packages/flynsarmy-slim-monolog)[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90234.6M36](/packages/bugsnag-bugsnag-laravel)[bugsnag/bugsnag

Official Bugsnag notifier for PHP applications.

56347.0M78](/packages/bugsnag-bugsnag)

PHPackages © 2026

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