Move Log Directory + Fix Permissions - #128
Conversation
noelherrick
left a comment
There was a problem hiding this comment.
Does the plugin already initialize the log in its own initialization? I'm just wondering if we need to explicitly call the legacy path deletion. Secondly, do we want to move the logs vs. delete them?
Plugins (except WooCommerce, which uses WooCommerce's logging system) initialize this class for logging, which would trigger the legacy path deletion. I'd prefer to have that logic here than in each individual Plugin.
Deletion is fine. These logs aren't designed to be long term - only when a creator reaches out for support and we request they enable debugging. We improve security by preventing bad actors guessing the log file name due to using From Kit/convertkit-wordpress#1174 (review)
Plugin functions typically aren't available on |
Summary
logfolder towp-content/kit-logs, ensuring Plugin checksum verification passes (Linear)wp_mkdir_p,file_put_contentsandfilemethods (Linear). This is similar to Use file_get_contents instead of WP_Filesystem for reading local files convertkit-wordpress#516, which was successful in resolving file permission issues.Testing
LogTestintegration tests added for theConvertKit_Logclass.Checklist