Giter Site home page Giter Site logo

mhcg / monolog-wp-cli Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 3.0 138 KB

Extension for Monolog to support outputting to WP-CLI (The WordPress command line interface) when running wp command lines.

License: MIT License

PHP 96.42% Dockerfile 3.58%
log logging psr-3 wp-cli monolog

monolog-wp-cli's People

Contributors

markheydon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

monolog-wp-cli's Issues

Provide basic PHP 8.x support

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

CI build failing on PHP 7.3 RC

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.

https://travis-ci.com/mhcg/monolog-wp-cli/jobs/152433096

`$logger->notice()` should be resolved to `WP_CLI::log` instead of `WP_CLI::warning`

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.

Add ability to create an instance of WPCLIHandler with a custom logger map

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.