Code

Updated JsonRPC class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 13:00:47 +0000 (13:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 13:00:47 +0000 (13:00 +0000)
-Updated debug handling

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20001 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_jsonRPC.inc

index d1287d1d83da89a4da2bb973fb376fdf9cf130d0..f7b7a501f4f4961c3e0a75c7242093e53bc2e7dc 100644 (file)
@@ -145,8 +145,12 @@ class jsonRPC {
         }else{
             DEBUG (DEBUG_RPC, __LINE__, __FUNCTION__, __FILE__,bold($this->get_error())."<br>".$response, "Result (FAILED): "); 
         }
-        if(isset($response['error']) && !empty($response['error'])){
-              print_a(array($response));
+
+        global $config;
+        $debugLevel = $config->get_cfg_value('core', 'debugLevel'); 
+        if($debugLevel & DEBUG_RPC){
+            print_a(array('CALLED:' => array($method => $params)));
+            print_a(array('RESPONSE' => $response));
         }
         return($response['result']);
     }