skyzyx / monolog-json-pretty-print-formatter
Pretty-prints JSON responses in the Monolog JsonFormatter!
Installs: 183 289
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=5.4.0
- monolog/monolog: *
This package is auto-updated.
Last update: 2021-06-06 09:04:13 UTC
README
A variation of the Monolog JsonFormatter
class which pretty-prints the JSON output. The API for this class is 100% backwards-compatible with JsonFormatter
.
Requirements
Required
The following software is required for JSON Pretty Print Formatter for Monolog to run:
- PHP 5.4.0+
Examples
use Monolog\Handler\StreamHandler; use Monolog\Logger; use Skyzyx\Monolog\Formatter\JsonPrettyPrintFormatter; $logger = new Logger('AwesomeSauce'); $handler = new StreamHandler('/var/log/awesomesauce.log', Logger::DEBUG); $handler->setFormatter(new JsonPrettyPrintFormatter()); $logger->pushHandler($handler);
Installation
Bundle with Composer (recommended!)
To add JSON Pretty Print Formatter for Monolog as a Composer dependency in your composer.json
file:
{ "require": { "skyzyx/monolog-json-pretty-print-formatter": ">=1.0" } }
And include it in your scripts:
require_once 'vendor/autoload.php';
Contributing
To view the list of existing contributors, run the following command from the Terminal:
git shortlog -sne --no-merges
How?
Here's the process for contributing:
- Fork JSON Pretty Print Formatter for Monolog to your GitHub account.
- Clone your GitHub copy of the repository into your local workspace.
- Write code, fix bugs, and add tests with 100% code coverage.
- Commit your changes to your local workspace and push them up to your GitHub copy.
- You submit a GitHub pull request with a description of what the change is.
- The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.
- If all goes well, your pull request will be accepted and your changes are merged in.
Authors, Copyright & Licensing
- Copyright (c) 2014 Ryan Parman.
See also the list of contributors who participated in this project.
Licensed for use under the terms of the MIT license.