DebugSubscriber - Fix compatibility with XDebug 2/3
[civicrm-core.git] / Civi / API / LogObserver.php
index b92eaa67d4048faded898571d7345db537688fce..c7cf5a32361d066d6b75889782c126536cb8c0ae 100644 (file)
@@ -23,7 +23,7 @@ class LogObserver extends \Log_observer {
    * @param array $event
    */
   public function notify($event) {
-    $levels = \Civi::log()->map;
+    $levels = \CRM_Core_Error_Log::getMap();
     $event['level'] = array_search($event['priority'], $levels);
     // Extract [civi.tag] from message string
     // As noted in \CRM_Core_Error_Log::log() the $context array gets prematurely converted to string with print_r() so we have to un-flatten it here