Files
sam-api/app/Services/TenantBootstrap/Support/TenantBootstrapLogger.php

24 lines
579 B
PHP
Raw Normal View History

<?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;
}
}