Skip to content

Commit

Permalink
Merge pull request #1 from xudianyang/master
Browse files Browse the repository at this point in the history
* 日志时间精度提升
  • Loading branch information
xudianyang authored Nov 30, 2017
2 parents e49806a + 2ef7853 commit 0e0a451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PGLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@ public function addRecord(int $level, string $message, array $context = []): boo

$levelName = static::getLevelName($level);

$uTime = explode(" ", microtime());
$record = [
'message' => $message,
'context' => $context,
'level' => $level,
'level_name' => $levelName,
'channel' => $this->name,
'datetime' => date('Y/m/d H:i:s'),
'datetime' => date('Y/m/d H:i:s', $uTime[1]) . trim($uTime[0], '0'),
'extra' => [],
];

Expand Down

0 comments on commit 0e0a451

Please sign in to comment.