• John

    (@dsl225)



    Hello,

    Is there a way to manually purge all event logs as this was the case with older versions?

Viewing 8 replies - 1 through 8 (of 8 total)
  • nlpro

    (@nlpro)

    Something like this ?

    https://imgur.com/a/bC4fC4a

    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro. Reason: Trying to embed the damn image into the post
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    • This reply was modified 4 months ago by  nlpro.
    John

    (@dsl225)

    Yep, exactly!
    I don’t have this section in sidebar.
    Is there a setting to enable it?

    ZenBen

    (@zenben)

    John

    (@dsl225)

    Thanks for the link…
    Really a shame!

    If it helps, I wrote a small plugin specifically for deleting iTheme logs. No warranty or responsibility, but it works: https://github.com/mikeott/log-cleaner-ithemes-security

    nlpro

    (@nlpro)

    @mikeyott

    Appreciate the effort but I think your neat plugin needs some extra context.

    It seems to be doing a bit more than just purge the event log (which by the way is to be expected when reading the button text ‘Delete all security logs’).

    In the last release (6.8.1) that the iTSec plugin still offered a Clear Logs button, it would only run this piece of code:

    $wpdb->query( "DELETE FROM” . $wpdb->base_prefix . “itsec_log;" );

    Where your plugin seems to be doing:

    $wpdb->query("TRUNCATE TABLE " . $lockouts_table);
    $wpdb->query("TRUNCATE TABLE " . $log_table);
    $wpdb->query("TRUNCATE TABLE " . $logs_table);
    $wpdb->query("TRUNCATE TABLE " . $temp_table);

    It seems to be clearing the lockouts and temp tables as well.
    It’s also attempting to clear the old log table ($log_table) which probably no longer exists in the database for most people. So that can be left out.

    Perhaps the plugin could be adapted to offer the option of clearing only the log table ($logs_table) or all (3) tables. That way it can also be used by people running the iTSec Pro plugin without losing the Dashboard Widget statistics …

    Thanks @nlpro,

    Yes my intention was to delete ALL logs, but you’ve made some great suggestions I think should be included.

    If you’re cool with it feel free to branch, make edits and do a pull request. Alternatively, I’ll see if I can find some time to update it this week.

    @nlpro

    Just letting you know I got around to updating the plugin based on your suggestions. You can now choose which logs to delete (and a handy ‘All’ option).

    I was aware of the old log_table but it’s difficult to know if it might be needed or not. I’m guessing it’s a legacy table no longer in use these days, but I would not be surprised if there are websites that haven’t been updated in forever that still have crap in that table. So I decided to let the plugin attempt to clear the table anyway, as it’s doing no harm.

    Thanks again for the feedback!

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.