Example - Log

There are two types of logs, Execution log and Error Log.


Execution Log

Execution log are basically log the execution of the website by the user. It shows which controller and which page is being called.

Execution Log

As shown in Figure above, Execution log can have detailed logs by displaying Object Return, Process Pass, Return Type, Exec Time and Memory Used. To have some detailed log recorded, some steps can be used to obtain detailed log for debugging purpose.

Steps 1 on having detailed log in ctlIndex(Control)

First, as shown in Figure above, $model = $this->returned($this->mod->mdldoc1->N()->showValue()); is used instead of $model = $this->mod->mdldoc1->N()->showValue();.

Steps 2 on having detailed log in mdldoc1(Model)

Next, the function in model called, in this scenario is showValue() must start with $this->Init($param); and end with return $this->End($data,true,”json”) instead of just return $data;.


Error Log

As shown in Figure below, execution error are being recorded in an error log. The error log contain time, date, Error type, file which involved error, and which line the error is in the file.

Error Log