mhcg / monolog-wp-cli Goto Github PK
View Code? Open in Web Editor NEWExtension for Monolog to support outputting to WP-CLI (The WordPress command line interface) when running wp command lines.
License: MIT License
Extension for Monolog to support outputting to WP-CLI (The WordPress command line interface) when running wp command lines.
License: MIT License
Would be useful to clarify how the --debug and --quiet options in WP-CLI effect the logging done by the handler.
Describe the bug
Essentially looks like PHPUnit 8 is being used for all version of PHP which was never going to work.
Additional context (Optional)
https://travis-ci.com/mhcg/monolog-wp-cli/builds/141622078
Describe the solution you'd like
Updating the composer PHP version from "php": "^7.2",
to "php": ">=7.2"
, would at least allow this to be installed on PHP 8.x systems.
Additional context (Optional)
None
Describe the bug
Doesn't currently build on PHP 7.3 RC due to some composer dependencies that probably aren't needed anyway.
Additional context
On reflection, was silly to include some of the packages like lint and sniffer as they are nothing to do with the build process or indeed the functionality of the project. Should take them out and keep composer.json lean as possible.
Function write
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Only really used during dev, but still, be good to have the issues fixed.
Hi @markheydon, thanks for this little package! This is not really a bug, but rather a design question.
Regarding to the documentation of Monolog:
NOTICE (250): Normal but significant events.
This should not trigger a WP_CLI::warning
, but rather just a simple WP_CLI::log
:
$logger->notice('Something normal but significant happened');
What do you think? Happy to create a PR if you agree.
Mini refactor of write() as well could increase the coverage to nearly 100%. Also see https://codeclimate.com/github/mhcg/monolog-wp-cli/src/Monolog/Handler/WPCLIHandler.php/source#issue-5ad54e79987697e28d4bafda610f12e1
The default logger map, mapping Logger methods to WP-CLI methods, should be more than sufficient for most uses. However, I can foresee some people may want to override the settings in some cases, for example, the ALERT level in the default has exit set to true. Maybe for some projects, this would be inappropriate.
The code was changed in commit 274f817 to support using an array for the mapping so shouldn't be a massive job now to allow a custom array to be used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.