Initial situation: There is a big Winform application with many dialogs and an Oracle database in the background. Now there is the requirement to implement a audit logging feature, which logs data changes (before/after) by the users (for later audits by audit departments of the company) in some dialogs. How would you integrate such a logging feature? By the way, the log-information should be saved in the database (history table) and the admin application of the Winform-solution should provide a browser dialog for the logging data.
Are there existing solutions or frameworks, which can be used. Makes it sense to use a logging framework like NLOG in that case or is it better to implement such a specific logging from the scratch?
When you want to log datachanges (on a database) you should use the log functionality offered by the database (with stored procedure, trigger and depending the database product built-in functionality like SQL Server Change Data Capture) because most of time you want to log the event regardless of the application/process (Winforms application, Website, Database management software) which trigger it.
You don't want (or will forgive) to recreate your log functionality on the next new client application.
Use the application log system when you want to trace event about the application use (crash, click on a button, start time,...)
Giving access to the log and make it human readable is another story.