Skip to content

Commit

Permalink
logs format
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe committed Nov 15, 2019
1 parent 20d8ffe commit 24f3d70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap/kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public function setting()
foreach (getAllHeaders() as $key => $value) {
$logs .= $key . ': ' . $value . "\n";
}
$logs .= "\n" . file_get_contents("php://input");
$logs .= "\n_____________________________________";
if ($body = file_get_contents("php://input")) {
$logs .= "\n" . $body . "\n";
}
$logs .= "_____________________________________";
$this->di->get('logger', [date('Ymd')])->log($logs, Logger::INFO);
}

Expand Down

0 comments on commit 24f3d70

Please sign in to comment.