Notion : https://www.notion.so/hamss/2579c8d34ba080d586b6faaae249f476?source=copy_link
17 lines
537 B
PHP
17 lines
537 B
PHP
<?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; }
|
|
}
|