Hello All,

I want some help on how to display the login logs and log out logs when any user or Clients logged in to the udp server or logged out of the server. I have to display following information:-
(1) For LoginLog - UserID,UserName,TransactionID,ClientIP along with id of 1 for Login.
(2) For LogoutLog - UserID,Count,ClientIP+Port along with id of 9 for logout.

Depends on how your system (i.e. UDP server) logs these things. For example, you might look at the last command in Linux for some of the information you seek but it does not contain the IP or transaction ID (whatever that is).
I assume there is some built-in log support for your server and, if there isn't, you will need to buid it in to get what you are after.

How can i display logs in the following format:-
Please help me with some sort of code :-

(1) For Login Logs :- XYZ,1,799,dmodi,e86979ff-dea7-4771-8f43-df6a65a25054:2,192.168.33.99

(2) For Logout Logs:- XYZ,9,799,1,192.168.33.99:57809

where XYZ suppose is the server name, 1 stands for login id , 799 is userid, tds is suppose user name, and after that it is transaction ID and Client IP at last which is 192.168.32.95 for example.Similarly, for logout 9 is the logout id, 799 is userid, 1 is count means how many users are logged out of the system. And after that follows, Client IP. How to solve this ??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.