Added api request debugging
This commit is contained in:
@@ -31,8 +31,25 @@ class mfBaseApicontroller {
|
||||
public function __construct($params = NULL) {
|
||||
// load logging facility
|
||||
$this->log = mfLoghandler::singleton();
|
||||
|
||||
$this->log->debug("new API request for ".$_SERVER['REQUEST_URI']);
|
||||
$logstr = "";
|
||||
foreach($_GET as $key => $value) {
|
||||
$logstr .= "; $key='$value'";
|
||||
}
|
||||
$this->log->debug("GET: ".print_r($_GET, true));
|
||||
|
||||
$logstr = "";
|
||||
foreach($_POST as $key => $value) {
|
||||
$logstr .= "; $key='$value'";
|
||||
}
|
||||
$this->log->debug("POST: ".print_r($_POST, true));
|
||||
|
||||
$this->loadRequest($params);
|
||||
|
||||
$this->log->debug("POST JSON: ".$this->request_json);
|
||||
$this->log->debug("HEADERS: ".print_r($this->headers, true));
|
||||
|
||||
register_shutdown_function(["mfBaseApicontroller", "return_errors"]);
|
||||
|
||||
// run Controllers init() function
|
||||
|
||||
Reference in New Issue
Block a user