Traditionally I would have parsed out info like user, connection and time stamp from some server log. It looks like things are quite different with Viya - especially with Viya 4.
I don't have the answer but below two links should you get you on the right path.
Viya 3.5: Logging: How To
Viya 4: A first look at logging in the new SAS Viya (also read at least some of the other articles referenced under here in this article - I then used search term: Viya Log to filter the article list)