• Resolved gutding

    (@gutding)


    Eversince a few minor versions ago, Flexible Shipping is hijacking my regular debug.log. I’m using a debug log plugin (Error Log Monitor Pro) which – usually- writes the debug log into the dir wp-content/elm-error-logs. I have an entry in my wp-config.php telling WP to do so:
    @ini_set('error_log', '/myhomedir/wp-content/elm-error-logs/php-errors.log');
    For some strange reasons flexible shipping is constantly changing this setting to their preferred address /wp-content/uploads/wpdesk-logs/wpdesk_debug.log. I can’t find any setting for flexible shipping to make it stop doing that.
    Can anybody please tell me how to achieve this?

    Thanks for your help. Regards, Rado

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Marta Borówka

    (@martapaw)

    Hello @gutding,

    Thank you for your reporting.
    Please update Flexible Shipping to the latest version and let us know if the problem is still occurring.

    Best regards,
    Marta

    Thread Starter gutding

    (@gutding)

    Hi Marta,
    thanks for getting back to me. I’m using ver. 3.3.13 already. So, yes the problem is still there.

    Best regards, Rado

    Plugin Support dyszczo

    (@dyszczo)

    Hi @gutding,

    The bug was fixed in 3.3.14 about two hours ago.

    Best regards,
    Dyszczo

    Thread Starter gutding

    (@gutding)

    Hi Dyszczo,

    I did install 3.3.14 but error_log still points to wpdesk_debug.log.
    Are there any hooks where I can deactivate this behaviour?

    Thank you. Regards, Rado

    Plugin Support dyszczo

    (@dyszczo)

    Hi @gutding,

    Debug log should now point to wpdesk_debug only when the logging is enabled in flexible shipping shipment settings. I though that would be sufficient. Before, the log file was always redirected and this behavior was surely invalid.

    I would rather not add the hook here: if we do this, it will be much harder to get the final debug info from some clients. Many times they have no idea where the log file really is and this would add another possible layer of abstraction for some clients.

    The full path of log file is generated in flexible-shipping/vendor/wpdesk/wp-logs/src/WP/WPCapture.php line 129 in get_log_file()

    Best regards,
    Dyszczo

    Thread Starter gutding

    (@gutding)

    Dear Dyszczo,

    Debug log should now point to wpdesk_debug only when the logging is enabled in flexible shipping shipment settings.

    Interesting. But where is this setting located? The only settings page I can find is under Woocommerce->settings->shipping->Flexible Shipping. And the only setting there is whether to use FS Connect or not…
    When I look at /wp-content/plugins/flexible-shipping/vendor/wpdesk/wp-logs/src/WPDeskLoggerFactory.php I find this comment:

    * Creates default WPDesk logger.
    *
    * Requirements:
    * – get_option, add/remove_action, add/remove filter and WP_CONTENT_DIR should be available for logger.
    *
    * Assumptions:
    * – logger is actively working when ‘wpdesk_helper_options’ has ‘debug_log’ set to ‘1’;
    * – fatal errors, exception and standard errors are recorded but in a transparent way;
    * – WooCommerce logger is captured and returns this logger; That is true of default logger is instantiated.
    * – logs are still correctly written to WooCommerce subsystem in a transparent way;
    * – all recorded errors are written to WPDesk file.

    When I look for ‘wpdesk_helper_options’ in my options db-table, I’ll get ‘wpdesk_tracker_agree’ set to 1 (when did I agree to that?). No debug_log entry.
    So why is WPCapture.php firing at all?
    I just want it to stop.
    Thanks. Regards, Rado

    Plugin Support dyszczo

    (@dyszczo)

    Hi @gutding,

    > Interesting. But where is this setting located? The only settings page I can find is under Woocommerce->settings->shipping->Flexible Shipping. And the only setting there is whether to use FS Connect or not…

    It looks like the easiest resolution for the problem at the moment is to add the filter, and we will do it shortly.

    Its name would be ‘wpdesk_is_wp_log_capture_permitted’ and the log won’t be captured when the filter returns false.

    > I just want it to stop.

    I’m sorry for incorrect plugin behavior. Thanks for your patience.

    Best regards,
    Dyszczo

    Thread Starter gutding

    (@gutding)

    Hi Dyszczo,

    as of ver. 3.4.0 it’s working now. Thank you!
    Just in case anybody wants to know how to stop flexible shipping from hijacking the error log. Just add this line to your functions.php:
    add_filter( 'wpdesk_is_wp_log_capture_permitted', '__return_false' );

    Regards, Rado

    Plugin Support dyszczo

    (@dyszczo)

    Hi @gutding,

    Great ?? Thanks for your patience ??

    Best regards,
    Dyszczo

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Flexible shipping is hijacking my debug.log’ is closed to new replies.