{"repo":"markheydon/monolog-wp-cli","free":true,"listed":false,"github":"https://github.com/markheydon/monolog-wp-cli","clone":"git clone https://github.com/markheydon/monolog-wp-cli.git","description":"Extension for Monolog to support outputting to WP-CLI (The WordPress command line interface) when running wp command lines.","language":"PHP","stars":10,"topics":["log","logging","psr-3","wp-cli","monolog","psr-12"],"license":"MIT","category":"cli-tools","readme_excerpt":"Monolog WP-CLI Handler Extension for Monolog that routes log output through WP-CLI when running wp commands. Installation Requirements - PHP ^8.1 - monolog/monolog ^3.0 Current stable releases target the Monolog 3 line. The v2.x branch is maintained separately for Monolog 2 users and receives critical fixes. Official WordPress-runtime support is maintained separately from the package runtime floor. The current policy supports the current and previous WordPress major series through an explicit smoke-test tuple list rather than a blanket WordPress/PHP cross-product claim. Usage WPCLIHandler works like any other Monolog handler. Create the handler and push it onto a logger inside a WP-CLI command context. By default the handler uses message-only output. Monolog context and extra data are only rendered when verbose formatting is enabled, either by passing true as the third WPCLIHandler constructor argument or when WP DEBUG is enabled. Version note (v2.2) From v2.2, default NOTICE handling changed from WP CLI::warning() to WP CLI::log() . - Before v2.2: notice messages were shown as Warning: output. - From v2.2: notice messages are logged as normal output with (NOTICE) level prefix. If you need previous behaviour, pass a custom logger map override as the fourth WPCLIHandler constructor argument: If you want Monolog context and extra data included in the output, enable verbose formatting: WordPress plugin-style example The following example registers a mycommand WP-CLI command that","default_branch":null,"files":null,"tree":[],"storefront":"/r/markheydon","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/markheydon/monolog-wp-cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}