inpsyde / Wonolog

Monolog-based logging package for WordPress.
https://inpsyde.github.io/Wonolog/
MIT License
173 stars 17 forks source link

Question: Getting wonolog to work #49

Closed siddjain closed 3 years ago

siddjain commented 4 years ago

I am relatively new to wordpress and PHP. I would like to use wonolog to log. When I read the instructions I see it says:

  1. install Wonolog via Composer;
  2. ensure Composer autoload is loaded in wp-config.php or anytime before the 'muplugins_loaded' action is fired;
  3. create a MU plugin that, at least, contains this code:

I was able to do 1. I now see this file structure:

bash-5.0# ls
composer.json         wp-activate.php       wp-content            wp-login.php
composer.lock         wp-admin              wp-cron.php           wp-mail.php
index.php             wp-blog-header.php    wp-debug.log          wp-settings.php
license.txt           wp-comments-post.php  wp-includes           wp-signup.php
readme.html           wp-config-sample.php  wp-links-opml.php     wp-trackback.php
vendor                wp-config.php         wp-load.php           xmlrpc.php
bash-5.0# ls vendor
autoload.php  composer      inpsyde       monolog       psr

But I don't know how to do 2 and 3. Could someone provide steps for 2 and 3?

gmazzap commented 3 years ago

I'm sorry, I think this question goes beyond the scope of issue tracker for Wonolog.

Creating a WordPress MU plugin and loading Composer autoload aren't Wonolog-specific issues.