Commit 4f2a69e9 by Qiang Xue

Added IP to log result.

parent 4d93e468
......@@ -238,6 +238,7 @@ abstract class Target extends \yii\base\Component
if (!is_string($text)) {
$text = var_export($text, true);
}
return date('Y/m/d H:i:s', $timestamp) . " [$level] [$category] $text\n";
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
return date('Y/m/d H:i:s', $timestamp) . " [$ip] [$level] [$category] $text\n";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment