• Resolved tonnick0033

    (@tonnick0033)


    Hello

    having the resmushit.log in wordpress root directory is not really good practive. how can we move this file and/or prevent to be written here ?

    thx !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Adrian

    (@adrianrus)

    Hi @tonnick0033,

    Sorry for the slow reply, looks like this has been missed by the old dev and we recently took over this project and added it to the ShortPixel family! ??

    This can be done easily by adding the following line to your wp-config.php file:

    define('RESMUSHIT_LOGS_PATH', '/wp-content/resmushit.log');

    The /wp-content/ was added by myself as an example, but you can switch that location to anything you want and even change the filename of the log.

    For faster support replies you can also contact us directly using this page https://resmush.it/contact/

    All the best!

    Is there a way to disable the log altogether? I do not have the log enabled (“enable logs” is unchecked), yet it is still writing a log file.

    Plugin Support Adrian

    (@adrianrus)

    Hi @cbutlerjr,

    Could you please confirm that you’re running the latest version of the plugin and that you also clicked Save Settings after disabling the logging option?

    We ran some tests with the logging feature disabled and the logs weren’t written anymore.

    If the logs are still written even after disabling the option and clicking save, please provide us the logs using the contact form on our website so we can analyze this further! https://resmush.it/contact/

    All the best,

    I’ll dig into that with some further testing to see what’s going on. If anything comes up, I’ll reach out via the contact form you noted since it’s not directly related to the OP’s issue.

    However… there is something I have noticed that IS directly related to the OP’s issue. Or, more accurately, your recommended solution in the answer.

    You cannot define the RESMUSHIT_LOGS_PATH constant in the wp-config.php file without generating a PHP warning. This constant is defined in resmushit.settings.php, so if you apply a definition in wp-config.php, you’ll get a warning notice when it the plugin tries to define it later.

    If you want these to be user definable (and you should), then you should either add a filter hook somewhere to allow it to be changed via a filter function (which would be the best alternative), OR, you should write in a check to see if the constant was defined already, such as:

    ( ! defined( 'RESMUSHIT_LOGS_PATH') ) ? define( 'RESMUSHIT_LOGS_PATH', 'resmushit.log' ) : '';

    As I noted, adding some filter hooks to modify certain settings/options would be helpful, but if you’re going to recommend that someone change a PHP constant, at least make it possible to do that without generating error notices.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Thank you, Chad, for your suggestion. We’ll forward it to our dev team.

    If you have any other observation to make, or any other question, feel free to use this contact form: https://resmush.it/contact/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to move the resmushit.log ?’ is closed to new replies.