How to know which user id had login the server?

which log file records all user id login infor?

The information is stored in a binary file that can be interrogated by the command "last".
Enter the command

man last

for details of the command, or just enter

last | more

to see what it does.