PHPackages                             akshaykhale1992/console-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. akshaykhale1992/console-logger

ActiveLibrary

akshaykhale1992/console-logger
==============================

A simple logger for PHP which logs into Browser's console log instead of a File or a Database.

v1.0(5y ago)1344MITPHPPHP &gt;=5.3

Since Jun 24Pushed 5y ago2 watchersCompare

[ Source](https://github.com/akshaykhale1992/console-logger)[ Packagist](https://packagist.org/packages/akshaykhale1992/console-logger)[ RSS](/packages/akshaykhale1992-console-logger/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

A simple Browser Console Logger for PHP
=======================================

[](#a-simple-browser-console-logger-for-php)

[![scrutinizer build status](https://camo.githubusercontent.com/038551d2ee121faf2a16fe7bfadd2710563f5e87a2b6fc0d78260d20f260b9d8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616b736861796b68616c65313939322f636f6e736f6c652d6c6f676765722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/akshaykhale1992/console-logger/?branch=master)[![scrutinizer version code](https://camo.githubusercontent.com/fb4697d6ac9695659a72dcc7e80f8bf577fe16974608594bc5788cb7e694a596/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616b736861796b68616c65313939322f636f6e736f6c652d6c6f676765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/akshaykhale1992/console-logger/?branch=master)

How it started ?
----------------

[](#how-it-started-)

We all have been in situations where we wanted to step through the code by logging the variable details. Most of the time we simply do.

```
print_r($variable);die();

```

And I find this process tedious, stopping for a simple variable log. I wanted a simple console log just like Javascript which is my inspiration behind creating console logger.

It is similar console log, it follows [PSR-3: Logger Interface](https://www.php-fig.org/psr/psr-3/) standards so you don't have to learn anything new.

How to use it ?
---------------

[](#how-to-use-it-)

1. Install the Package using composer

    composer require akshaykhale1992/console-logger
2. User the Logger

Sample Code:

```
