PHPackages                             gbox/minilog - 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. gbox/minilog

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

gbox/minilog
============

A dependency free PHP logging utility that just friggin' works :)

2.0.0(4y ago)120[2 issues](https://github.com/bmcminn/minilog/issues)MITPHP

Since Jul 31Pushed 4y ago2 watchersCompare

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

READMEChangelog (5)DependenciesVersions (5)Used By (0)

Minilog
=======

[](#minilog)

A dependency free PHP logging utility that just friggin' works :)

Why yet another logging utility?
--------------------------------

[](#why-yet-another-logging-utility)

I like projects like Monolog, but they lack basic conveniences I like about the native `console.log()` in JavaScript; plus I have a niceities baked into Minilog that you may like as well:

- dependency free
- Each log method accepts N arguments and automagically concatenates them into a log message (just like JS console.log!!! :D)
- automagically JSON encodes arrays and objects (just like JS console.log :P), and tags the output accordingly
- automagically determines which CLI stream to write to; allowing for CLI logging when running on PHP's internal server
- automagically applies color coding of CLI messages based on log level severity
- conditionally allows each logger instance to log the calling file and line number so you know where the log message originated from
- automagically prepends each log file with the Y-M-D for daily log rotation

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

[](#installation)

Open up your favorite CLI and enter the typical `composer require` command:

```
> composer require gbox/minilog
```

BOOM! Now get logging!

Usage:
------

[](#usage)

Using `Minilog` is pretty straightforward. You define a `new \Gbox\Minilog()` class intance, you pass in the name of the logger context, and you may pass an option associative array of options to configure it for your needs.

```
