public static function sendEventLog($event_message = '') { /** * Self-hosted Monitor. * * Send a copy of the event log to a local file, this will allow the * administrator of the server to integrate the events monitored by the plugin * with a 3rd-party service like OSSEC or similar. More information in the Self- * Hosting panel located in the plugin' settings page. */ if (function_exists('sucuriscan_selfhosting_fpath')) { $monitor_fpath = sucuriscan_selfhosting_fpath(); if ($monitor_fpath !== false) { $local_event = sprintf("%s WordPressAudit %s %s : %s\n", date('Y-m-d H:i:s'), SucuriScan::get_top_level_domain(), SucuriScanOption::get_option(':account'), $event_message); @file_put_contents($monitor_fpath, $local_event, FILE_APPEND); } } if (SucuriScanOption::is_enabled(':api_service')) { SucuriScanAPI::sendLogsFromQueue(); return SucuriScanAPI::sendLog($event_message); } return true; }