<?php

namespace App\Services\TenantBootstrap\Support;

class TenantBootstrapLogger
{
    private array $messages = [];

    public function info(string $msg, array $ctx = []): void
    {
        $this->messages[] = ['level' => 'info', 'msg' => $msg, 'ctx' => $ctx, 'ts' => now()->toDateTimeString()];
    }

    public function error(string $msg, array $ctx = []): void
    {
        $this->messages[] = ['level' => 'error', 'msg' => $msg, 'ctx' => $ctx, 'ts' => now()->toDateTimeString()];
    }

    public function dump(): array
    {
        return $this->messages;
    }
}
