aspirepress / AspireUpdate

A plugin that allows for rewriting the URLs used to fetch updates from WordPress.org to some other endpoint
15 stars 4 forks source link

debug log setup not working? #2

Closed asirota closed 1 week ago

asirota commented 1 week ago

I added these to my wp-config.php on dev.newpathconsulting.com

// AspirePress update-plugin debugging

define('AP_UPDATER_HOST_REWRITES', ['api.wordpress.org' => 'your-repo.com',]);

define( 'AP_UPDATER_DEBUG', true);

I can't find a debug log when I try updating a plugin in my wp-content folder. Any guidance?

sarah-savage commented 1 week ago

You'll want to define the AP_UPDATER_DEBUG_LOG_PATH to a location you can observe, where it will write the log. Let me know if that fixes your issue.

asirota commented 1 week ago

Ok will do but should it not log into /wp-content by default ? WP_CONTENT_DIR is the default.

https://codex.wordpress.org/Determining_Plugin_and_Content_Directories

sarah-savage commented 1 week ago

I just set it to log to ABSPATH but feel free to have it log wherever is appropriate! I'm not picky.

See https://github.com/aspirepress/updater-plugin/commit/311fc0f82fbedce5ee2a07c1335f07ecef3b0bba