final class ExceptionLogger (View source)

Records uncaught runtime and PHP diagnostics through the error channel, including bootstrap fallback.

Methods

Binds diagnostic reporting to the root container and canonical application paths.

void
log(Throwable $exception, string $source)

Records an uncaught throwable without allowing logging failures to alter error handling.

void
void
logHttp(Throwable $exception, string $source)

Records an HTTP-boundary throwable without persisting its message, trace, or object graph.

void
void
logPhpDiagnostic(int $severity, string $message, string $file, int $line, string $source)

Records a PHP diagnostic with its severity and source location.

void

Details

__construct

__construct(ContainerInterface $container, ApplicationContext $context)

Binds diagnostic reporting to the root container and canonical application paths.

Parameters

ContainerInterface $container
ApplicationContext $context

log

void log(Throwable $exception, string $source)

Records an uncaught throwable without allowing logging failures to alter error handling.

Parameters

Throwable $exception
string $source

Return Value

void

logHttp

void logHttp(Throwable $exception, string $source)

Records an HTTP-boundary throwable without persisting its message, trace, or object graph.

This boundary is intended for failures that may include request-controlled data.

Parameters

Throwable $exception
string $source

Return Value

void

logPhpDiagnostic

void logPhpDiagnostic(int $severity, string $message, string $file, int $line, string $source)

Records a PHP diagnostic with its severity and source location.

Parameters

int $severity
string $message
string $file
int $line
string $source

Return Value

void