PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Services/LoggingService.php +2 -7 3.0.2.6 → 3.0.16 View file →
@@ -39,14 +39,9 @@
39 39 // Format log entry
40 40 $timestamp = current_time('Y-m-d H:i:s');
41 41 $context_str = !empty($context) ? ' | Context: ' . wp_json_encode($context) : '';
42 42 $log_entry = sprintf('[%s] [%s] %s%s', $timestamp, strtoupper($level), $message, $context_str);
43 -
44 - // Write to WordPress debug log if WP_DEBUG_LOG is enabled
45 - if (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) {
46 - error_log('Yatra: ' . $log_entry);
47 - }
48 -
43 +
49 44 // Store in database for admin viewing
50 45 self::storeLog($message, $level, $context);
51 46 }
52 47
@@ -100,9 +95,9 @@
100 95 if (count($logs) > 1000) {
101 96 $logs = array_slice($logs, -1000);
102 97 }
103 98
104 - update_option('yatra_logs', $logs);
99 + update_option('yatra_logs', $logs, false); // autoload=false: grows; read on demand only
105 100 }
106 101
107 102 /**
108 103 * Get logs