Implements MeshVault M1 (issues #6–11): - Four-service Docker Compose stack (nginx, PHP-FPM 8.3, PostgreSQL 17, Node assets) - Slim 4 + PHP-DI routing with escaped PHP views and production/dev error handling - Immutable validated AppConfig with redacted diagnostics - JSON stdout Monolog logging with job-scoped context - Tailwind CSS v4 deterministic locked builds with template scanning - POSIX and PowerShell dev wrappers (up/down/test/lint/assets/watch) - Startup config validation fails before FPM serves as unprivileged www-data - migrate/seed explicitly unavailable until M2 (#12); #10 remains open Verified via clean-start acceptance on remote host (keith@192.168.2.23).
26 lines
595 B
PHP
26 lines
595 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MeshVault\Logging;
|
|
|
|
use Psr\Log\AbstractLogger;
|
|
use Psr\Log\LoggerInterface;
|
|
use Stringable;
|
|
|
|
/** Immutable job scope; no mutable processor shared with another job. */
|
|
final class JobLogger extends AbstractLogger
|
|
{
|
|
public function __construct(
|
|
public readonly LoggerInterface $logger,
|
|
private readonly string $jobId,
|
|
) {
|
|
}
|
|
|
|
public function log($level, string|Stringable $message, array $context = []): void
|
|
{
|
|
$context['job_id'] = $this->jobId;
|
|
$this->logger->log($level, $message, $context);
|
|
}
|
|
}
|