If you have logging enabled in ulx's server.ini (and it is by default), every player that joins gets a line like the following
"[time]Client "<name>" spawned in server (<ip>:<port>)<steamid>"
stored in the logs.
There are also logs made whenever a player connects, however, that doesn't mean they spawned into the server.
(A banned player using join spam, etc, could cause multiple "connected" entries)
See your server gmod\data\ulx_logs folder. They're by date
When searching, the file, use "spawned in server" as text to search for to find IPs
As for console, I believe there are already convars to enable logging of that sort built into Source server.
I don't remember what I had to type, but I now see "rcon from <ip> : <command>" whenever rcon is used.
I know there's a way to have that save, I just don't remember it. It's not ULX.
Try in your server or game client console typing "find log" and it will print out all the convars and little tips for them that include the word "log"