C
C#3y ago
schrute

How to capture all user actions in a winform application to store them in a log file?

My goal is to create a log file (a txt file will do) of all actions that an end user takes while using this application. Example actions could be a button-click, writing in a blank text field, (de)select a check-box, close an activity/tab, etc. I want to capture all such user interactions in the application UI, and have those actions stored as summarized one line descriptions of the action in a text log file.
6 Replies
schrute
schruteOP3y ago
this is my code. I am communicating serially with arduino. I am reading data from interface. and I want to save user movements to a log file as I explained above.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
pip
pip3y ago
That solution works, the technically good way is to implement a Logger and have it sink to a file, but that might be too complex for the scope of this app
mtreit
mtreit3y ago
The suggested solution is not thread-safe, which might not be a problem for Windows Forms event handlers (they all execute on the main UI thread I think?) but something to be aware of.
schrute
schruteOP3y ago
how can ı creat log file in my code and how can ı implement it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server