Tracking All session history in one file

Dear All,

I want to keep all the session history in one file,please help me out to configure so.

Here is the test scenario-

Suppose i have three client A,B and C tries to log in to one Server XA there session specific command and Clint IPADDRESS should get logged in one file...like .bash_history or any other file if there.

I tried simple implementation but it didn't work....I don't have much idea about linux please help me out to configure so.

I tried below procedure..

HOSTTIMEFORMAT="%d/%m/%y %t $SSH_CLIENT"

When i set above environment variable it formats the output of "history" command.

$SSH_CLIENT will track client specific IP ADDRESS

Thanks and Regards
Monoj