# Loging metod call

**URL:** https://talk.remobjects.com/t/loging-metod-call/17872
**Category:** Remoting SDK
**Created:** [November 8, 2018, 9:29pm UTC](https://talk.remobjects.com/t/loging-metod-call/17872 "2018-11-08T21:29:38Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [November 9, 2018, 9:33am UTC](https://talk.remobjects.com/t/loging-metod-call/17872/4 "2018-11-09T09:33:08Z")

</div>

How do you want to intercept every request?

- for example, you can use [OnReadFromStream](https://docs.remotingsdk.com/API/Delphi/Classes/TROServer/#OnReadFromStream)/[OnWriteToStream](https://docs.remotingsdk.com/API/Delphi/Classes/TROServer/#OnWriteToStream) events of Server component. here you can get client’s request and server’s response.

- if you want just get information about client, you can use `OnGetDispatchInfo` event of \_Impl. see code snippet in [Receiving information about client on server-side](https://talk.remobjects.com/t/receiving-information-about-client-on-server-side/10981) topic

- another way - create descendant of TROInvoker and override `CustomHandleMessage` method.

old code:

```auto
initialization
  fClassFactory := TROClassFactory.Create('MegaDemoService', Create_MegaDemoService, TMegaDemoService_Invoker);

```

new one:

```auto
type
 TMyMegaDemoService_Invoker = class(TMegaDemoService_Invoker)
 protected
    function CustomHandleMessage(const aFactory: IROClassFactory;
      const aMessage: IROMessage;
      const aTransport: IROTransport;
      out oResponseOptions: TROResponseOptions): boolean; override;
..
initialization
  fClassFactory := TROClassFactory.Create('MegaDemoService', Create_MegaDemoService, TMyMegaDemoService_Invoker);

```

in `TMyMegaDemoService_Invoker.CustomHandleMessage` you can allow/disallow execution of server’s method

---

_[View the full topic](https://talk.remobjects.com/t/loging-metod-call/17872)._
