international numbers have a +
[auerswald-callnotifier.git] / src / callnotifier / Logger / Debug.php
index 460f91fb8db13fdd327ed8a7f8547ac7fc7b2bb6..ef5d812c1728dd818b3eb37e1c1a38240f2f8814 100644 (file)
@@ -8,11 +8,11 @@ class Logger_Debug implements Logger
     public function __construct()
     {
         $cc = new \Console_Color2();
-        $this->begin = $cc->convert('%y');
-        $this->end = $cc->convert('%n');
-        $this->blue = $cc->convert('%b');
-        $this->red = $cc->convert('%r');
-        $this->white = $cc->convert('%w');
+        $this->begin  = $cc->convert('%y');
+        $this->end    = $cc->convert('%n');
+        $this->blue   = $cc->convert('%b');
+        $this->red    = $cc->convert('%r');
+        $this->white  = $cc->convert('%w');
         $this->purple = $cc->convert('%p');
     }
 
@@ -62,8 +62,8 @@ class Logger_Debug implements Logger
     {
         echo sprintf(
             $this->purple . 'EDSS1_Message' . $this->end
-            . ' type %02X '
-            . $this->purple . '%s' . $this->end
+            . ' type 0x%02X '
+            . $this->blue . '%s' . $this->end
             . ' SAPI %d, CR %d, TEI %d, call %d-%s'
             . ', %d parameters',
             $msg->type,
@@ -78,11 +78,11 @@ class Logger_Debug implements Logger
 
         foreach ($msg->parameters as $param) {
             echo sprintf(
-                " Parameter type %02X%s, %d bytes: %s\n",
+                " Parameter type 0x%02X%s, %d bytes: %s\n",
                 $param->type,
                 $param->title
                 ? ' ' . $this->purple . $param->title . $this->end
-                : '',
+                : ' ' . $this->purple . $param->getTypeName() . $this->end,
                 $param->length,
                 preg_replace('/[^[:print:]]/', '?', $param->data)
                 . (isset($param->number)