extract the success/failure logging of the builder to an interface.

This commit is contained in:
steve.brazier 2013-12-06 11:31:39 +00:00
commit 6aed18158b
3 changed files with 42 additions and 11 deletions

31
PHPCI/BuildLogger.php Normal file
View file

@ -0,0 +1,31 @@
<?php
namespace PHPCI;
use Psr\Log\LogLevel;
/**
* PHPCI Build Logger
*/
interface BuildLogger
{
/**
* Add an entry to the build log.
* @param string|string[] $message
* @param string $level
* @param mixed[] $context
*/
public function log($message, $level = LogLevel::INFO, $context = array());
/**
* Add a success-coloured message to the log.
* @param string
*/
public function logSuccess($message);
/**
* Add a failure-coloured message to the log.
* @param string $message
* @param \Exception $exception The exception that caused the error.
*/
public function logFailure($message, \Exception $exception = null);
}