allow more log
authordemeritcowboy <demeritcowboy@hotmail.com>
Mon, 9 May 2022 12:39:44 +0000 (08:39 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Tue, 10 May 2022 14:24:10 +0000 (10:24 -0400)
CRM/Core/Error/Log.php
CRM/Utils/EchoLogger.php
CRM/Utils/SystemLogger.php
Civi/Api4/Action/System/RotateKey.php
composer.json

index 9904045ad1a169f5c3ed3981e44a41ba13f52c73..964c7ed0ac2cc47bce5ecf71795acf768975a524 100644 (file)
@@ -52,7 +52,7 @@ class CRM_Core_Error_Log extends \Psr\Log\AbstractLogger {
    * @param string $message
    * @param array $context
    */
-  public function log($level, $message, array $context = []) {
+  public function log($level, $message, array $context = []): void {
     // FIXME: This flattens a $context a bit prematurely. When integrating
     // with external/CMS logs, we should pass through $context.
     if (!empty($context)) {
index c6db7c04b7f5da065d87253d44039918f1d45da6..1bad4ae9eaacdb97e080f133e3c281d67261e67e 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Utils_EchoLogger extends Psr\Log\AbstractLogger implements \Psr\Log\Lo
    * @param string $message
    * @param array $context
    */
-  public function log($level, $message, array $context = []) {
+  public function log($level, $message, array $context = []): void {
     echo $message . "\n";
   }
 
index eefdaffe5c06af1d666a71b65c114ee7173ddbb2..25d7356ae228cf11af3e548ba0f3b48590fcd3a9 100644 (file)
@@ -23,7 +23,7 @@ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\
    * @param string $message
    * @param array $context
    */
-  public function log($level, $message, array $context = []) {
+  public function log($level, $message, array $context = []): void {
     if (!isset($context['hostname'])) {
       $context['hostname'] = CRM_Utils_System::ipAddress();
     }
index c904a2c0e4bcea85805e1f1c2844d9d5f622fd1e..7afc9b204ee042e6da01a10175cc765bacbc3131 100644 (file)
@@ -60,7 +60,7 @@ class RotateKey extends AbstractAction {
        * @param string $message
        * @param array $context
        */
-      public function log($level, $message, array $context = []) {
+      public function log($level, $message, array $context = []): void {
         $evalVar = function($m) use ($context) {
           return $context[$m[1]] ?? '';
         };
index e2edf902b4bb9f93251827d7a624f9e6864382d5..43f5f96eff17d6810bbceac05c998dc2c6dc0940 100644 (file)
@@ -59,7 +59,7 @@
     "symfony/filesystem": "~3.0 || ~4.4",
     "symfony/process": "~3.0 || ~4.4",
     "symfony/var-dumper": "~3.0 || ~4.4 || ~5.1",
-    "psr/log": "~1.0",
+    "psr/log": "~1.0 || ~2.0 || ~3.0",
     "symfony/finder": "~3.0 || ~4.4",
     "tecnickcom/tcpdf" : "6.4.*",
     "totten/ca-config": "~22.05",