From 9fd551f07d5fd533edef5a040db2df0a1748b9c6 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Sat, 28 Sep 2019 14:17:58 +0200 Subject: [PATCH] add debugging mechanism --- activitypub.php | 3 +++ includes/class-debug.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/activitypub.php b/activitypub.php index e1fc92c..963165e 100644 --- a/activitypub.php +++ b/activitypub.php @@ -61,6 +61,9 @@ function init() { require_once dirname( __FILE__ ) . '/includes/class-hashtag.php'; \Activitypub\Hashtag::init(); + require_once dirname( __FILE__ ) . '/includes/class-debug.php'; + \Activitypub\Debug::init(); + #require_once dirname( __FILE__ ) . '/includes/class-health-check.php'; #\Activitypub\Health_Check::init(); } diff --git a/includes/class-debug.php b/includes/class-debug.php index ea78770..5539cf6 100644 --- a/includes/class-debug.php +++ b/includes/class-debug.php @@ -17,7 +17,7 @@ class Debug { } public static function log_remote_post_responses( $response, $url, $body, $user_id ) { - \error_log( "Request to: {$url} with response: " . \print_r( $response, 'true' ) ); + \error_log( "Request to: {$url} with response: " . \print_r( $response, true ) ); } public static function write_log( $log ) {