Update logger.php

This commit is contained in:
Namhyeon Go 2018-09-28 15:38:18 +09:00 committed by GitHub
parent 70d11da219
commit 8fd500db77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,12 +8,16 @@
if(!function_exists("write_visit_log")) { if(!function_exists("write_visit_log")) {
function write_visit_log() { function write_visit_log() {
loadHelper("networktool"); $fw = false;
$data = "\r\n" . json_encode(get_network_event()); if(loadHelper("networktool")) {
return write_storage_file($data, array( $data = "\r\n" . json_encode(get_network_event());
"storage_type" => "logs", $fw = write_storage_file($data, array(
"filename" => "vspf-network.log", "storage_type" => "logs",
"mode" => "a", "filename" => "vspf-network.log",
)); "mode" => "a"
));
}
return $fw;
} }
} }