WooCommerce Power BI ConnectorWooCommerce Power BI Connector
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start (5 min)
    • Features
    • Installation
    • Azure AD Setup
    • Power BI Account Setup
    • Setup Wizard
  • Configuration

    • Settings
    • Access Control
  • Reports & Alerts

    • Dashboard
    • Reports & Dashboards
    • Alerts
  • Data & Sync

    • Workspaces, Datasets & Tables
    • Sync & Scheduler
    • Data Load Profiles
    • Query Builder
    • Export Center
  • Advanced

    • Logs & Audit Trail
    • REST API & WP-CLI
    • Troubleshooting
    • FAQ
    • Glossary
Support
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start (5 min)
    • Features
    • Installation
    • Azure AD Setup
    • Power BI Account Setup
    • Setup Wizard
  • Configuration

    • Settings
    • Access Control
  • Reports & Alerts

    • Dashboard
    • Reports & Dashboards
    • Alerts
  • Data & Sync

    • Workspaces, Datasets & Tables
    • Sync & Scheduler
    • Data Load Profiles
    • Query Builder
    • Export Center
  • Advanced

    • Logs & Audit Trail
    • REST API & WP-CLI
    • Troubleshooting
    • FAQ
    • Glossary
Support
  • Getting Started

    • Introduction
    • Quick Start — 5 Minutes
    • Features
    • Installation — Full Setup Guide
    • Azure AD Setup
    • Power BI Account Setup
    • Setup Wizard
  • Configuration

    • Plugin Settings
    • Access Control
  • Reports & Alerts

    • Dashboard
    • Reports & Dashboards (Embedding)
    • Smart Alerts
  • Data & Sync

    • Workspaces, Datasets & Tables
    • Sync & Scheduler
    • Data Load Profiles
    • Query Builder
    • Export Center
  • Advanced

    • Logs & Audit Trail
    • REST API & WP-CLI
    • Troubleshooting
    • FAQ
    • Glossary

Logs & Audit Trail

The Logs page is the plugin's source of truth for every operation — syncs, profile runs, alert fires, credential changes, API errors, and background retries. Use it for debugging, auditing, compliance, and performance tuning.

URL: /wp-admin/admin.php?page=wkpbic-logs


Two Log Streams

The page has two tabs: Sync Logs and Audit Trail.

Sync Logs tabSync Logs — every sync run with status, rows, duration, and errors.

1. Sync Logs

Every sync run (manual, scheduled, live, or profile) generates one parent entry plus one child entry per entity/batch.

ColumnDescription
IDInternal log ID
Profile / SourceWhich profile or "Ad-hoc"
EntityOrders / Products / etc.
ModeFull / Incremental
Rows PushedSuccessfully sent to Power BI
Rows FailedFailed batches still in retry queue
DurationTotal execution time
StartedStart timestamp
EndedEnd timestamp
Status✅ Success / ❌ Failed / ⚠️ Partial / Running / Queued
ErrorFirst error message (click for full stack)
ActionsView Details, Retry, Download JSON

Audit Trail tabAudit Trail — user and system actions with timestamps and diffs.

2. Audit Trail

Tracks user and system actions for compliance:

ColumnDescription
TimeWhen it happened
UserWho did it (or "System")
Actione.g. settings.updated, alert.created, profile.deleted
TargetThe object affected
DetailsJSON diff of before/after (for settings changes)
IPSource IP address

Filters

Both tabs support the same set of filters:

  • Date range (today, last 7 days, custom)
  • Status (Success / Failed / Running / All)
  • Entity (dropdown)
  • Profile (dropdown)
  • User (dropdown — audit trail only)
  • Search (free-text across log messages)

Filters are combined with AND logic.


View Details

Click any row to open a side panel with:

  • Full timeline of the run (batch by batch)
  • HTTP requests made to the Power BI API (method, URL, status code, latency)
  • Full error messages + stack traces
  • Rows-per-second performance graph
  • Retry history (if any)

Retry Failed Batches

If a run is marked Partial or Failed, click Retry in the Actions column to re-push only the failed batches. The retry respects the watermark — it will not duplicate already-successful rows.


Retention & Auto-Cleanup

To keep the database lean, logs are auto-purged:

Log TypeDefault Retention
Sync Logs30 days
Audit Trail90 days
API Request Logs7 days

Change retention at Logs → Settings (top-right gear icon), or via WP-CLI:

wp option update wkpbic_log_retention_days 60
wp option update wkpbic_audit_retention_days 180

Manual Cleanup

  • Clear Sync Logs — removes all sync log entries older than today
  • Clear Audit Trail — removes audit entries older than today
  • Clear API Request Logs — quick purge of debug traffic

Warning

Clearing logs is irreversible. Download a JSON backup first (top-right export button) if you need to preserve history for compliance.


Exporting Logs

Click Export at the top of the page. Choose format:

  • CSV — tabular, good for Excel
  • JSON — full nested details
  • NDJSON — streaming-friendly for log ingestion platforms

The export honors your current filters.


Integrating with External Logging

Power users can forward logs to external systems:

  • Action Scheduler — logs are visible under Tools → Scheduled Actions → wkpbic-*
  • WordPress logs — set WP_DEBUG_LOG = true and the plugin writes to wp-content/debug.log
  • Syslog / Filebeat / Loki — hook into the filter wkpbic_log_entry to forward each entry
add_action( 'wkpbic_log_entry', function( $entry ) {
    syslog( LOG_INFO, wp_json_encode( $entry ) );
} );

WP-CLI

# Show the 20 most recent sync logs
wp wkpbic logs --limit=20

# Only failed Orders syncs
wp wkpbic logs --entity=orders --status=failed

# Audit trail
wp wkpbic logs --audit --limit=50
Next
REST API & WP-CLI