hi abu,
I have custom pdate function and then after a update I want to log the update, so I have log class and calling the info method. but, I get an error.. when I use firebug in grid. It shows internal error.
The log code is fine. the cbject calling ($log->warn) calling does not work in after_upadte or delete in grid.
function after_update($data)
{
$name=$data["params"]["Product_name"];
if($ans=abcwarehouse($name))
$log->warn("Deleted added inventory:name:$name:,q:$qty1");
}else
{
phpgrid_error("SQL Error");
}
}
Are there any internal logging features?
Hi,
You either need to create $log class object again OR
Declare $log as global variable inside function.
Looks to be a variable scope issue.
function after_update($data)
{
global $log;
…
}
Plus, if you need to log after update … you can also use
on_after_update event. Works same as on_update except that it is fired after the update database query.