Skip to content

Commit

Permalink
增加显示访问ip
Browse files Browse the repository at this point in the history
  • Loading branch information
hbh112233abc committed Oct 13, 2020
1 parent 608c8af commit bb7d604
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DingLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class DingLog implements LogHandlerInterface
'at' => [],
'show_params' => true,
'show_included_files' => false,
'show_ip' => true,
'debug' => true,
'secret' => '',
'keyword' => '',
Expand Down Expand Up @@ -60,6 +61,9 @@ public function save(array $log = []): bool
if ($this->config['show_params']) {
$trace[] = '[params]' . var_export(Request::param(), true);
}
if ($this->config['show_ip']) {
$trace[] = '[ip]' . Request::ip(true);
}

foreach ($log as $type => $val) {
foreach ($val as $msg) {
Expand Down

0 comments on commit bb7d604

Please sign in to comment.