I need your input guys on this concept I intend to implement:
Use the Command Pattern to record everything in my app. It should encapsulate every single user action and micro-action as a Command and write it to a log file, for example the format of the log file can be something like this:
time=20:56:33 action=USER_SELECTED_ROWS_IN_DATAGRID control=dgEmployees RowId=2,5,8,9 time=20:56:51 action=USER_ERASED_SELECTED_ROWS_IN_DATAGRID control=dgEmployees
Then later the log file will have multiple uses:
It can serve as a backup: The app can be launched in simulation mode, it can start with an empty database and by executing all commands from the log file the app can restore its database and settings to their latest state.
I can analyse a client's log file to learn how they use my app.
I can analyse a client's log file to locate a bug that he has run into.
I can write various testing configurations with different such log files.
So my question to you guys is: Has anyone else thought of this strategy before? If this concept has a proper technical name or you know of any tutorials exploring it in more detail, I'd like to know more about it.