View Categories

How to Stop Logging Some Events

Logtivity has option to store only the logs that matter to you. In this guide, we’ll show you two options for blocking unwanted logs.


How to Stop Logs on One Site

If you find that a plugin is recording data that isn’t useful, you can easily stop those logs from inside the Logtivity plugin. In this screenshot below, I have Easy Digital Downloads installed. You can check out our detailed EDD integration here. You’ll notice that EDD is adding several metadata logs.

If you don’t want to record these logs, go to Logtivity > Settings in your WordPress admin area and you’ll see an area called “Disable Individual Logs”. Enter the log name here, which in this example is “Edd Subscription Log Meta Added”.

Important: Please note that it make take some time for these changes to be pushed to your plugins. In order to minimize the impact on your site, the Logtivity plugin only checks for settings updates a few times per hor.


How to Stop Logs on All Your Sites

It is possible to disable some logs across all your sites. You can see the same syntax as inside the plugin.

  • Go to “Team Settings”, then “Activity Log Settings” in the Logtivity app.
  • Any entries in here will apply to all your sites. For example, if you enter “User Logged In” to this field, Logtivity will stop recording user login data across every site.

Using Code to Stop Logs

You can also disable the default logs on an individual basis via the filter example below. This example will prevent Logtivity from recording the “Post Updated” action logs:

add_action('wp_logtivity_instance', function($Logtivity_Logger) {

    if (strpos($Logtivity_Logger->action, 'Post Updated') !== false) {
        $Logtivity_Logger->stop();
    }

});