/**
  * {@inheritdoc}
  */
 public function child(Node $node)
 {
     $logger = $this->logger->child($node);
     $log = $logger->getLog();
     $normalized = $this->logNormalizer->normalize($log);
     echo sprintf('[%s] %s' . "\n", $normalized['type'], isset($normalized['contents']) ? $normalized['contents'] : '[no content]');
     return $logger;
 }
 /**
  * {@inheritdoc}
  */
 public function patch(Log $log, array $patch)
 {
     $normalized = $this->logNormalizer->normalize($log);
     $patched = array_merge($normalized, $patch);
     if (array_key_exists($patched['_id'], $this->logs)) {
         $patched = array_merge($this->logs[$patched['_id']], $patched);
     }
     $this->logs[$patched['_id']] = $patched;
     return $this->logNormalizer->denormalize($patched);
 }
 /**
  * {@inheritdoc}
  */
 public function archive(Log $log)
 {
     $url = sprintf('%s/v1/archive/%s', $this->baseUrl, $log->getId());
     $response = $this->request('POST', $url);
     return $this->logNormalizer->denormalize($response);
 }