logger = $logger; } /** * {@inheritdoc} */ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage { $this->logger->debug($message->toString()); return new SentMessage($message, $envelope ?? Envelope::create($message)); } /** * Get the logger for the LogTransport instance. * * @return \Psr\Log\LoggerInterface */ public function logger() { return $this->logger; } /** * Get the string representation of the transport. * * @return string */ public function __toString(): string { return 'log'; } }