getCode(); $context['url'] = get_current_url(); $context['trace'] = trace_to_call_points(trace_from_exception($context['e'])); unset($context['e']); // Don't log these records $ignoredExceptions = [ 'Exception Exception: You must specify a format', 'Exception InvalidArgumentException: Format name invalid', 'Exception InvalidArgumentException: Unknown format given', 'Exception InvalidArgumentException: Bridge name invalid', 'Exception Exception: Invalid action', 'Exception Exception: twitter: No results for this query', // telegram 'Exception Exception: Unable to find channel. The channel is non-existing or non-public', // fb 'Exception Exception: This group is not public! RSS-Bridge only supports public groups!', ]; foreach ($ignoredExceptions as $ignoredException) { if (str_starts_with($context['message'], $ignoredException)) { return; } } } $text = sprintf( "[%s] rssbridge.%s %s %s\n", now()->format('Y-m-d H:i:s'), $level, $message, $context ? Json::encode($context) : '' ); error_log($text); } }