• Resolved dimal

    (@dimalifragis)


    Hello.

    Is there a way to exclude logged in Admins from Traffic log? Admins logs “pollute” the log with a huge amount of complicated data, not needed.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Paul

    (@paultgoodchild)

    Hi,

    Absolutely. But it applies to all logged-in users. Please see the docs in our knowledgebase:

    https://help.getshieldsecurity.com/article/154-how-to-manually-customize-exclusions

    Thread Starter dimal

    (@dimalifragis)

    Yes, i saw that option but i’m talking about admins only not all users. Log logged in users but not admins. Admins log is full especially if they do work on the site and the rest (users) gets somehow “lost”.

    Plugin Author Paul

    (@paultgoodchild)

    You can use a filter within Shield to control whether a request will be logged. Here’s an example that should do what you need:

    add_filter( 'shield/is_log_traffic', function ( $isLogged ) {
    $user = wp_get_current_user();
    if ( !empty( $user ) && user_can( $user, 'manage_options' ) ) {
    $isLogged = false;
    }
    return $isLogged;
    } );

    You can add that anywhere in your theme’s functions.php file.

    Thread Starter dimal

    (@dimalifragis)

    Many thanks !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Traffic Log Exclusions & Logged-In Users’ is closed to new replies.