View Categories

How to Ignore Some Activity Logs

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


The Syntax to Ignore Logs

You can disable individual logged actions here by listing the action names, one per line.

To specify the context field as well, separate the action and context keywords with an && symbol.

You can also specify wild card with a * sign. This is helpful if you want to specify the Context but not the Action, or if you wanted to specify just a keyword to ignore and not a full matching Action or Context.

Here are some examples below:

User Logged In
User Logged In && administrator
* && subscr*
* && administrator
Post Published
Post Updated
Post Published && Contact Us
Post Updated && Contact Us
* && Contact Us
Updated*

How to Ignore Logs on All Your Sites

It is possible to disable some logs across all your sites.

  • 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.
Ignore logs on all sites

How to Ignore 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.

Ignore Activity 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.

Disable Individual Logs

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();
    }

});