Skip to content

Commit

Permalink
[Mailer] use microsecond precision SMTP logging
Browse files Browse the repository at this point in the history
  • Loading branch information
0xb4lint authored and fabpot committed Nov 9, 2024
1 parent a305f46 commit abbcc8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Transport/Smtp/Stream/AbstractStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class AbstractStream
public function write(string $bytes, bool $debug = true): void
{
if ($debug) {
$timestamp = date('c');
$timestamp = (new \DateTimeImmutable())->format('Y-m-d\TH:i:s.up');
foreach (explode("\n", trim($bytes)) as $line) {
$this->debug .= \sprintf("[%s] > %s\n", $timestamp, $line);
}
Expand Down Expand Up @@ -93,7 +93,7 @@ public function readLine(): string
}
}

$this->debug .= \sprintf('[%s] < %s', date('c'), $line);
$this->debug .= \sprintf('[%s] < %s', (new \DateTimeImmutable())->format('Y-m-d\TH:i:s.up'), $line);

return $line;
}
Expand Down

0 comments on commit abbcc8b

Please sign in to comment.