<?php

namespace Planaday\Api\Mock;

use Planaday\Api\LoggingApi;
use Planaday\Utility\Debug\Log\LogEntry;
use Planaday\Utility\Debug\Log\Logging;

class MockLoggingApi implements LoggingApi{
	use Logging;

	public function sendErrorLog( LogEntry $log ): void {
		$this->logInfo("MockLoggingApi sending error log", $log->__toString());
	}

	public function handleLog( LogEntry $entry ): void {
		if ( $entry->getType() === "error" )
			$this->sendErrorLog($entry);
	}
}