Skip to content

Commit

Permalink
Tweak - Add error file url and error line number in log
Browse files Browse the repository at this point in the history
  • Loading branch information
lekhnathpandey committed Oct 9, 2023
1 parent a41ef8c commit 79376ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion user-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public function log_errors() {
if ( $error && in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ), true ) ) {
$logger = ur_get_logger();
$logger->critical(
$error['message'] . PHP_EOL,
/* translators: 1: error message 2: file name and path 3: line number */
sprintf( __( '%1$s in %2$s on line %3$s', 'user-registration' ), $error['message'], $error['file'], $error['line'] ) . PHP_EOL,
array(
'source' => 'fatal-errors',
)
Expand Down

0 comments on commit 79376ca

Please sign in to comment.