WP-Discourse: How to change de logs directory, or disable it completely?

Our uploads folder is in a S3 bucket. The logging feature from Wp Discourse is adding a lot of load to the server, due to the constant writes to the uploads folder.

I need to completely disable the WP Discourse logs, or at least change the path to the log files directory.

Is there a way to customize that with a hook, or maybe defining a variable in wp-config.php?

You’re talking about the logs created by WordPress? Or discourse?

Discourse.

I’ve already disabled all the specific log options in the plugin settings, but it still does a lot o R/W in the directory,

You mean this, right?

wp-discourse is a WordPress plugin.

Those are WordPress logs. So if you want to change them you should do something lke https://www.google.com/search?q=wordpress+limit+log+size&oq=wordpress+limit+log+size.

There could be somewhere here who knows, but that search, especially on Christmas, is likely going to yield faster results.

Hi Jay,

Sorry, i meant wp-discourse.

I don’t want to limit the size of the log. I need to change the directory that the plugin uses to save the log files, or completely disable the logging feature.

As i mentioned, our uploads folder is in a S3 bucket, mounted using Rclone. WP Discourse makes constant writes in this “logs-metafile.txt” file, and this increases the server load a lot.

I checked the log generator file from WP Discourse, and it fetches the wp_uploads_dir directly, so i don’t think there’s a official way to change the directory, right?

Thanks for this report @Thiago_Mobilon.

We’ll be making a change to address this in the next release of the WP Discourse plugin.

5 Likes

Just a note that the next release of the plugin 2.4.8 includes:

  • a fix for the specific issue @Thiago_Mobilon reported; and
  • a setting to disable logging entirely

The fix should address the issue you’re experiencing @Thiago_Mobilon so you shouldn’t need to disable logging, but you’re welcome to of course.

The release is currently up for review. When this PR is merged it’ll be released to wordpress.org.

4 Likes