From 167bfa56e880132373ed63f890b4354518e8ef26 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 9 Apr 2025 13:30:19 +1000 Subject: [PATCH] Pass context to the logger class When extending the Logger class, information about the Database connection is likely to be required by the Logger. --- inc/class-runner.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/class-runner.php b/inc/class-runner.php index 386235c..8140efc 100644 --- a/inc/class-runner.php +++ b/inc/class-runner.php @@ -372,7 +372,9 @@ protected function check_workers() { */ $logger = $this->hooks->run( 'Runner.check_workers.logger', - new Logger( $this->db, $this->table_prefix ) + new Logger( $this->db, $this->table_prefix ), + $this->db, + $this->table_prefix ); // Clean up all of the finished workers