woocommerce/plugins/woocommerce-beta-tester/api
Chi-Hsuan Huang cfca07eca8
Reducing Noise in Remote Logging (#51357)
* Refactor remote logging in WooCommerce

This commit refactors the remote logging functionality in WooCommerce to improve its efficiency and flexibility.

- In the `class-woocommerce.php` file, the `context` array now includes a new key `remote-logging` to indicate whether the error should be logged remotely if remote logging is enabled.

- In the `RemoteLogger.php` file, the `file` key in the `context['error']` array is now assigned to the `$log_data` array, and then unset from the `context['error']` array.

- The `should_handle` method in the `RemoteLogger` class now checks for the presence of the `remote-logging` key in the `context` array. If it is not set or set to `false`, the log is ignored.

- The `RemoteLoggerTest.php` file includes new test cases to ensure that the `should_handle` method returns `false` when the `remote-logging` key is not present in the `context` array.

These changes improve the remote logging functionality in WooCommerce and make it more robust and efficient.

* Revert log format change

* Set remote-logging context to true in log remote event method

* Add changelog

* revert change

* revert change
2024-09-18 08:57:32 +08:00
..
admin-notes Deprecate unsupported Inbox note banner layout (#51275) 2024-09-13 01:11:11 +00:00
features Applied PHPCS To Beta Tester (#39476) 2023-08-08 17:20:34 -07:00
live-branches Applied PHPCS To Beta Tester (#39476) 2023-08-08 17:20:34 -07:00
options [Beta Tester] Flush cache after deleting option and resetting PHP rate limit (#50512) 2024-08-12 18:05:01 +08:00
remote-inbox-notifications Beta tester - fix lint errors (#48825) 2024-06-25 21:09:14 -07:00
remote-logging Reducing Noise in Remote Logging (#51357) 2024-09-18 08:57:32 +08:00
remote-spec-validator Fix lint errors with remote spec validator endpoint (#47520) 2024-05-16 15:25:59 -07:00
rest-api-filters Applied PHPCS To Beta Tester (#39476) 2023-08-08 17:20:34 -07:00
tools Refactor WooCommercePayments task to use woo payment gateway from`WC()->payment_gateways->payment_gateways()` (#50953) 2024-08-28 10:44:28 +08:00
tracks Allow print_r in beta tester logger (#41101) 2023-10-30 12:35:54 -05:00
api.php [Beta tester] Add fake WooPayments completion tool (#50699) 2024-08-22 10:27:35 +08:00