You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Introduction

This article features the Log Cleaner Plugin and sample app created by Mokxa Technologies LLC. This plugin was created to add in a process tool or scheduler to clear the API logs, scheduler logs and Audit trail logs from Joget database with duration from 8 days to 90 days old. It is used to delete old log data from these tables to maintain the database size. This article showcases the functionality and capability of this plugin.

Prerequisite

This plugin requires Joget DX Enterprise version.

Plugin Information

Plugins Available in the Bundle:

  1. Log Cleaner (Process Tool)

This plugin bundle is compatible with Joget DX  8 and onwards.

To download this plugin, visit the Joget Marketplace.

For any issues related to this plugin, visit the Log Cleaner Plugin Github page.

Steps to install

  1. In the Joget App Center, Navigate to Settings > Manage Plugins and click Upload Plugin.
  2.  Select the Log Clearner jar file and click Add. the plugin is listed in the Installed Plugins tab.
  3. Create a new app and create a new process.
  4. In Process Builder, add a Participant, Start and Tool to the participant. 
  5. Click the tool and in the Mapping tab, select Log Cleaner in the Tools drop-down list.

Usage

Log Cleaner Plugin Properties

NameDescription
Log Type

Select the logs from the Joget database that will be deleted.

  • API Logs: Deletes logs from the api_log table.
  • Schedule Logs: Deletes logs from the sch_job_log table.
  • Audit Logs: Deletes logs from the wf_audit_trail table.
Duration

Select the number of days before a log is deleted. The following are the options available:

  • 8 days
  • 15 days
  • 30 days
  • 60 days
  • 90 days

Using the Log Cleaner Plugin with the Scheduler Plugin

The Log Cleaner Plugin can also be used with the Scheduler Plugin to trigger the log cleaning process when a specific event occurs, for example, clearing logs on the first day of each month. When configuring the Scheduler Plugin properties, select the app containing the Log Cleaner Plugin for the App field and the Log Cleaner Plugin for the Plugin field.


NameDescription
Job NameSpecify a name for the scheduled job.
Cron Expression

A cron expression is a string comprising five or six fields separated by white space that represents a set of times, normally as a schedule to execute some routine.

App

Select the app containing the Log Cleaner Plugin

Plugin

Select the Log Cleaner Plugin.

Expected Outcome

The following image displays the logs that will be cleared after the expected duration elapses.

Download Sample App

APP_logcleaner-1-20250207013847.jwa

Credits

This plugin, sample app and document is created by Mokxa Technologies, LLC.


  • No labels