Question: Hello friends I am an android developer and right now i am working on sencha touch framework on android platform to develop an app which can run on multi platform e.g android tablets and ipads.

But i have question in my mind that if i create my app on android tablet emulator according to the android tablet need(means layout configuration),will the same app work on ipad? or i have to work on simulator to make it work on ipad? Please suggest me with ur views.

Thanx in advance.

Answer: 
So, you have `UI <-> Web Services <-> DB`

Since the **web services** talk to the DB, and the web services contain the business logic (i.e. I guess you validate stuff there, create your queries and execute them), then the best place to 'log' activities is in the services themselves.

IMO, logging **PostgreSQL** transactions is a different thing. It's not the same as logging 'user activities' anymore.

**EDIT:** This still means you create DB schema for 'logs' and write them to DB.

**Second EDIT:** Catching log worthy events in the **UI** and then logging them from there might not be the best idea either. You will have to rewrite logging if you ever decide to replace the UI, or for example, write an alternate UI for, say mobile devices, or something else.
In your log table you can have various columns, including:

* `user_id` (the user that did the action)
* `activity_type` (the type of activity, such as `view` or `commented_on`)
* `object_id` (the actual object that it concerns, such as the Article or Media)
* `object_type` (the type of object; this can be used later, in combination with `object_id` to lookup the object in the database)

This way, you can keep track of all actions the users do. You'd need to update this table whenever something happens that you wish to track.