Update logger.php
This commit is contained in:
parent
bededbbdb1
commit
459838c4e8
|
@ -9,19 +9,21 @@
|
||||||
if(!check_function_exists("write_visit_log")) {
|
if(!check_function_exists("write_visit_log")) {
|
||||||
function write_visit_log() {
|
function write_visit_log() {
|
||||||
$fw = false;
|
$fw = false;
|
||||||
|
$msg = "";
|
||||||
|
|
||||||
$event = get_network_event();
|
$event = get_network_event();
|
||||||
if(loadHelper("networktool")) {
|
if(loadHelper("networktool")) {
|
||||||
if(loadHelper("rsf.format")) {
|
if(loadHelper("rsf.format")) {
|
||||||
$data = DOC_EOL . get_rsf_encoded($event);
|
$msg = get_rsf_encoded($event);
|
||||||
} else {
|
} else {
|
||||||
$data = DOC_EOL . json_encode(get_network_event());
|
$msg = json_encode(get_network_event());
|
||||||
}
|
}
|
||||||
|
|
||||||
$fw = append_storage_file($data, array(
|
$fw = append_storage_file($data, array(
|
||||||
"storage_type" => "logs",
|
"storage_type" => "logs",
|
||||||
"filename" => "network.log",
|
"filename" => "network.log",
|
||||||
"chmod" => 0644,
|
"chmod" => 0644,
|
||||||
|
"nl" => "<",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,11 +33,11 @@ if(!check_function_exists("write_visit_log")) {
|
||||||
|
|
||||||
if(!check_function_exists("write_common_log")) {
|
if(!check_function_exists("write_common_log")) {
|
||||||
function write_common_log($msg) {
|
function write_common_log($msg) {
|
||||||
$msg = DOC_EOL . $msg;
|
|
||||||
return append_storage_file($msg, array(
|
return append_storage_file($msg, array(
|
||||||
"storage_type" => "logs",
|
"storage_type" => "logs",
|
||||||
"filename" => "common.log",
|
"filename" => "common.log",
|
||||||
"chmod" => 0644,
|
"chmod" => 0644,
|
||||||
|
"nl" => "<",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user