WhoKnew Views™ | Diagnostic Logging

Skip to main content
Table of Contents
Print

Automatic event tracking that captures every drift, decay, preset change, and API call for effortless troubleshooting

Every time WhoKnew Views™ Pro makes a decision—starting a drift, removing expired views, or calling the Prophet API—it logs that action. These logs create a permanent audit trail that transforms mysterious issues into obvious answers.

🔒 PRO FEATURE — Requires WhoKnew Views™ Pro


📚 The Five Log Types

WhoKnew Views™ Pro maintains five specialized logs, each capturing a different category of events with appropriate retention limits:

📋

Activity Log

Tracks view events, drift operations, and system actions

📊 Last 50 entries⏱️ Most comprehensive

🔧

Corruption Log

Records data issues detected and auto-repairs applied

📊 Last 20 entries🛡️ Auto-fix tracking

⚠️

Tampering Log

Captures integrity protection events and suspicious activity

📊 Last 10 entries🔒 Security events

🔄

Preset Change Log

Tracks every preset application and baseline modification

📊 Last 50 entries📋 Before/after values

🔮

Prophet API Log

Full request/response data for AI forecasting calls

📊 Last 3 calls🌐 Raw API data


🎯 Event Types Captured

The Activity Log captures a wide variety of events. Here’s what each event type means:

📉 View Decay Events

padded_view_decay

Fired when padded views expire outside the view counting window

Example: “3 padded view(s) aged out and removed”

padded_retention_cleanup

Fired when 90-day data retention removes old padded timestamps

Example: “5 padded view(s) >90 days removed”

🔄 Drift System Events

living_drift_start

Living Baseline Drift activated (inactive product)

living_drift_locked

Drift paused because real visitor detected

target_drift_update

Baseline moving toward target (preset change)

target_drift_complete

Target baseline reached successfully

drift_hierarchy

Priority decision made between drift systems

⚙️ System Events

preset_change → Preset applied or baseline modified
data_cleaned → Corrupted data auto-repaired
cache_cleared → Forecast cache purged
palette_change → Analytics color palette updated


📝 Sample Log Entries

Here’s what log entries look like in the System Info report:

🟢 Activity Log Entry

[2026-01-06 14:32:18] Product #1842
Event: living_drift_start
Details: Living Baseline Drift STARTED: 156 → 178
        (range: 96-178, bias: neutral, speed: smooth)

🔵 Preset Change Log Entry

[2026-01-06 10:15:42] Product #1842
Action: preset_applied
Preset: Flash Sale Mode
Baseline: 156 → 312
Application Mode: drift

🟣 Prophet API Log Entry

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Call #1 – ✓ SUCCESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Timestamp: 2026-01-06 09:45:22 (6 hours ago)
Product: Premium Widget (ID: 1842)
Mode: 30-day forecast
Data Points: 28
HTTP Code: 200
Forecast Points: 30


🔍 Where Logs Are Stored

💡 Technical Note: All logs are stored as WordPress options with the autoload parameter set to false. This means they’re only loaded when the System Info page is accessed—not on every page load—keeping your site fast.

Log TypeWordPress Option KeyEntries Kept
📋 Activitywkv_activity_log50
🔧 Corruptionwkv_corruption_log20
⚠️ Tamperingwkv_tampering_log10
🔄 Preset Changeswkv_preset_change_log50
🔮 Prophet APIwkv_prophet_api_log3

🛠️ Integration with WordPress Debug

When WP_DEBUG is enabled, diagnostic events are also written to the WordPress error log for real-time monitoring:

// wp-config.php
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);

// This creates wp-content/debug.log with entries like:
[06-Jan-2026 14:32:18 UTC] WKV LIVING BASELINE DRIFT – Product #1842: STARTED
[06-Jan-2026 14:45:03 UTC] WKV PROPHET API [SUCCESS] – Product #1842 | Mode: 30d | Data Points: 28

ℹ️ Best of Both Worlds: The System Info logs are lightweight and always available. The error_log integration provides real-time streaming for developers actively debugging. Both capture the same events.


🧹 Clearing Logs

While logs auto-rotate (older entries are removed as new ones arrive), you can manually clear all logs if needed:

🚨 Developer Only: There’s no UI button to clear logs—they’re meant to persist for troubleshooting. The wkv_clear_diagnostic_logs() function exists for test suites and can be called programmatically if needed.


💡 Using Logs for Troubleshooting

🔎 Common Diagnostic Scenarios

Baseline disappeared?Check Preset Change Log for unexpected resets
Views stuck/frozen?Check Activity Log for drift events or decay
Forecast failed?Check Prophet API Log for error responses
Data looks wrong?Check Corruption Log for auto-repairs
Suspicious changes?Check Tampering Log for integrity alerts
Share