How to log certain information

If I wanted to log certain bits of information in a menu how would I do it.
If I wanted to log each time a person clicked a button including the time/person who clicked the button.

Just some pseudo code since I have nothing to base this off of:

file.Append(“mylog.txt”, “Button was pressed/n”)

That might point you in the right direction. If you’re looking for more detail you have to give us more than just “a log when a button is pressed”

Okay well then to be more precise. I want these logs to draw out nicely across a DFrame.
Log who issued the press. Along with what time they issued the press. That’s about it.
I’ll figure out the rest on my own.

Log who issued the press?

Log when they issued it?


If you want to put it nicely in a DFrame, just use any table-to-string and string-to-table functions you want to add the data to the text file, then load it and convert it to a table, then use that table to create the vgui elements needed. Simple.