예제 #1
0
 /**
  * Write messages to build log.
  *
  * @param  \KevinDierkx\Muse\Events\Console\Satis\WriteEventInterface  $event
  * @return bool
  */
 protected function writeToLog(WriteEventInterface $event)
 {
     $buildFile = 'build/build-' . $event->getBuildAt()->format('YmdHis') . '.log';
     if (!$event->getNewline()) {
         return false;
     }
     if (is_array($messages = $event->getMessages())) {
         return $this->storage->append($buildFile, implode(PHP_EOL, $event->getMessages()));
     }
     return $this->storage->append($buildFile, $messages);
 }
예제 #2
0
파일: Storage.php 프로젝트: bugotech/io
 /**
  * Append to a file.
  *
  * @param  string $path
  * @param  string $data
  *
  * @return int
  */
 public function append($path, $data)
 {
     $path = $this->getPathPrefix($path);
     return $this->drive->append($path, $data);
 }