Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions includes/fbutils.php
Original file line number Diff line number Diff line change
Expand Up @@ -991,28 +991,6 @@ public static function log_exception_immediately_to_meta( Throwable $error, arra
ErrorLogHandler::log_exception_to_meta( $error, $context );
}

/**
* Utility function for sending logs to Meta.
*
* @since 3.5.0
*
* @param string $message
* @param array $context optional error message attributes
*/
public static function log_to_meta( string $message, array $context = [] ) {
$extra_data = self::get_context_data( $context, 'extra_data', [] );
$extra_data['message'] = $message;
$context['extra_data'] = $extra_data;

// Push logging request to global message queue function.
$logs = get_transient( 'global_logging_message_queue' );
if ( ! $logs ) {
$logs = [];
}
$logs[] = $context;
set_transient( 'global_logging_message_queue', $logs, HOUR_IN_SECONDS );
}

/**
* Checks whether fpassthru has been disabled in PHP.
*
Expand Down