Logger..??

Issue #15 closed
Drew Angell repo owner created an issue

Looking at the helper class I see that we're hard-coding the valu for $this->debug to "yes" instead of providing an option for that in our plugin settings. Is that intended?

I guess I'm not entirely sure what this logger is doing. Is that the general logger saving the IPN data, or is this something else? It looks like it should be saving an actual txt file somewhere, but I'm not seeing a paypal-ipn-for-wordpress-logs/ directory like it seems to be showing..??

If this is an additional logger of some kind I would like to make the option for enable/disable available in the general settings for the plugin.

Comments (11)

  1. jignesh kaila

    Actually, I have develop this functionally for saving the IPN data and other log only for developer.

    I am done with this issue, will push Issue-15 branch by tomorrow morning for your review.

  2. jignesh kaila

    I am ready to push this branch, but I wait for Issue-7 branch merge to development branch.

    Once you merge Issue-7 branch to development branch, I will pull development branch to Issue-15 and push to Issue-15 for your review.

    I have to follow rule to avoid conflict issue, hope this make sense.

  3. Drew Angell reporter

    When I first uploaded these changes and looked at the settings page I was getting the highlighted message that my log directory was not writable. This is because the /paypal-ipn-for-wordpress-logs directory was not created on my server, and it did not create it for me.

    Once I manually created that folder at the root of my site then the message went away and I was presented with the regular option to enable/disable logging.

    I never have that problem with WooCommerce created the /wc-logs directory, so I'd like to try and make sure we don't have to manually create that here either. On that note, I know Woo used to keep the WC logs within the /woocommerce plugin directory, but then they moved it to /wc-logs at the site root. I'm not sure if there was any specific reason for that..??

    If we can keep our logs within our plugin folder, though, I think that would make sense. If it's better to keep the logs at the site root that's fine, but again, I'd like to figure out how to make it so the site owner doesn't have to manually create that folder.

  4. Drew Angell reporter

    When I ran a test using the IPN simulator I wound up with 2 log files inside the logs folder. One is called paypal-3b....log and contains the actual log data as expected. The other is called test-log.log and is empty. Seems like it's just leftover and needs to be removed..??

  5. jignesh kaila

    Yes I look into this and I found one problem from my side that paypal-ipn-for-wordpress-logs directory it not create it self.

    WooCommerce moved wc-logs folder to root because wc-logs folder need file write permission. if wc-logs folder within plugin folder it's not good for security concern. as per WordPress standard plugin folder should not writable permission (plugin folder have 644 permission).

    As per standard I have manage paypal-ipn-for-wordpress-logs folder in root directory.

    regarding not create paypal-ipn-for-wordpress-logs problem I have resolved it, now it working file from us.

    regarding test-log.log file, It for testing purpose to check paypal-ipn-for-wordpress-logs folder has write permission or not.

    I have pushed this changes to dev branch. Please review it and let me know for the same.

  6. Drew Angell reporter
    • changed status to open

    Reopening this issue because now that we changed the log directory to /paypal-ipn-logs instead of /paypal-ipn-for-wordpress-logs I'm getting the error about not writable again. It wasn't able to create itself.

    "Log directory (/home/angelley/sandbox_woocommerce/paypal-ipn-logs/) is not writable. To allow logging, make this writable or define a custom PAYPAL_IPN_FOR_WORDPRESS_LOG_DIR."

  7. Log in to comment