nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.84k stars 304 forks source link

Q:Does Webdis have logging? #86

Closed rogeryu23 closed 10 years ago

rogeryu23 commented 10 years ago

Due to some limitationI have to use the following socket code to send request and sometimes I can get the http body but sometimes I can't, so I want to check the webdis logging to see the incoming request, where can I find it?

<?php $fp = fsockopen("10.42.1.101", 7379); if (!$fp) { echo "Unable to open\n"; } else {

fwrite($fp, "GET /Get/foo HTTP/1.0\r\n\r\n");
stream_set_timeout($fp, 1);
$res = fread($fp, 20000);

$info = stream_get_meta_data($fp);
fclose($fp);

if ($info['timed_out']) {
    echo 'Connection timed out!';
} else {
    echo $res;
}

}

Thanks

nicolasff commented 10 years ago

Hello,

You can enable logging by setting a logging level and a file destination in webdis.json.