Log commands

This commit is contained in:
2023-11-25 21:38:00 -03:00
parent ec4b16b2af
commit df679b2a1a
9 changed files with 39 additions and 57 deletions

View File

@ -2,21 +2,17 @@
namespace Incoviba\Command\Money;
use DateTimeImmutable;
use Psr\Http\Client\ClientInterface;
use Symfony\Component\Console;
use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand(
name: 'money:uf'
)]
class UF extends Console\Command\Command
class UF extends Command
{
public function __construct(protected ClientInterface $client, string $name = null)
{
parent::__construct($name);
}
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
{
$this->logger->debug("Running {$this->getName()}");
$now = new DateTimeImmutable();
$uri = '/api/money';
$data = [