Skip to content
Adeptus is a powerful, extendable WordPress activity log plugin.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
deploy
lib/psr/log
src
.gitattributes
.gitignore
.travis.yml
CHANGELOG.txt
LICENSE
autoload.php
composer.json
composer.lock
readme.md
readme.txt
wp-adeptus.php

readme.md

Adeptus Banner

Introduction

Adeptus is a lightweight plugin that allows you to send WordPress website logs to syslog, logstash, debug.log and error_log for you to collect, store, process and monitor your logs seamlessly.

With Adeptus you have the ability to:

  • Monitor all website and CMS activity in real time
  • Audit stored logs information for security and debuggin purposes
  • Visualize log data in 3rd party apps (Grafana, Kibana, etc..)
  • Quickly generate reports in 3rd party apps

Built-In Events

Attachments

Created
Updated
Deleted/Trashed

Core

Wordpress updated

Menus

Created
Deleted
Menu item added/update/moved/deleted

Options

Option changes

Plugins

Installed (covered by plugin activation)
Activated/Deactivated
Updated
Deleted (covered by plugin deactivation)

Themes

Activated/Deactivated 
Updated

Posts (inc. all custom post types)

Created
Updated
Deleted/Trashed
Published

Taxonomies

Category created
Category moved
Category updated
Category deleted

Users

Login
Logout
Profile updated
Password changed
Password reset
Role updated
Created
Deleted/Trashed

Fatal PHP Errors/Exceptions

Ability to disable logging per request (e.g. during imports)

Comments

Created
Change Status (Spam/Deleted/Trashed)

Widgets (Options)

Added
Updated
Removed

WooCommerce

Woocommerce Options
Add / Edit / Delete Product
Update Product Variation
Ppdate Product Attribute

Other Options

ACF options page(s) (i.e. global content)
Yoast (settings changes)

Custom Events

Sometimes we need to run some custom events (i.e. running cronjobs or importing some data) which contains thousand of events or db updates. To prevent storing to many logs on the server, it's better to ignore the events caused by the custom script.

Enable/Disable Logging in Custom Events

To disable and enable logging in custom events such as importing scripts wrap the script you don't want to be logged between following function calls:

\Adeptus::disableLogging();

// your code here...

\Adeptus::enableLogging();

In this case the events between these 2 lines won't be logged.

Example

function do_import() 
{
    \Adeptus::logEvent([
        'alert_code'        => 20080,
        'alert_level'       => \Psr\Log\LogLevel::INFO,
        'alert_title'       => 'Import Started',
        'alert_description' => 'Import Started',
        'sensor'            => 'ImportExample'
    ]);

    \Adeptus::disableLogging();

    // Perform import
    update_option('blogname',rand());

    \Adeptus::enableLogging();

    \Adeptus::logEvent([
        'alert_code'        => 20080,
        'alert_level'       => \Psr\Log\LogLevel::INFO,
        'alert_title'       => 'Import Finished',
        'alert_description' => 'Imported 100 items successfully',
        'sensor'            => 'ImportExample'
    ]);
}

Hooks

adeptus/activate [Action]

Trigger when plugin activates.

adeptus/loggers [Action]

Allows registration of custom loggers.
class MyLogger implements \Psr\Log\LoggerInterface {
    //...
}

add_action('adeptus/loggers', function($alert_manager) {
    $logger = new MyLogger();
    $alert_manager->setLogger($logger);
});

adeptus/sensors [Filter]

Allows filtering of sensors and/or registration of additional sensors which provide loggable events.

adeptus/alert_manager/alert_title [Filter]

Allows filtering of the alert title.

adeptus/alert_manager/alert_level [Filter]

Allows filtering of the alert level.

adeptus/alert_manager/context [Filter]

Allows filtering of the alert context.

adeptus/alert_manager/loggers [Filter]

Allows filtering of the loggers when an event is triggered.

adeptus/sensors/options/whitelist [Filter]

This filter is in OptionsSensor and includes a list of most important options to log.

adeptus/sensors/options/woocommerce_blacklist [Filter]

Blacklisted WooCommerce options to be ignored.

Enable/Disable Logging Globally

To enable logging across entire website add the following line in .env file:

define('WP_ADEPTUS_LOGGING_DISABLED', true);

You can’t perform that action at this time.