How to add auto error logger filter for remobjects serverside?

RemObjects SDK Server side need to add a filter, when request method occur error on the server side,the filter automatically record the request method name, the request parameters to facilitate the subsequent troubleshooting.

I want to know how? I am using RO for Delphi .

You can create a descendant of T%your_service_name%_Invoker, where you can override AfterInvoke method like

procedure TMyInvoker.AfterInvoke(aMethodPtr: TMessageInvokeMethod;
  const anInstance: IInterface; const aFactory: IROClassFactory;
  const aMessage: IROMessage; const aTransport: IROTransport;
  anException: Exception);
var
  itestintf: ITestInvokeInterface;
begin
  inherited;
  if anException <> nil then Log(....); 
end;

see the Dispatch Notifier sample for more details.

1 Like