I’m supposed to be logging a “commercial” transaction object (e.g. the request/response of a credit card processing gateway).
Someone mentioned using log4net to store that… but it just doesn’t feel right, especially given that some information (i.e. properties on the object) need to be either omitted entirely or massaged (e.g. only log the last 4 digits of the credit card involved in the transaction).
I was thinking more of a custom “ITransactionLogger”. Thoughts?
I would say that you are doing “auditing” not “logging”, in that you are producing data of business significance. This implies that the data needs to be managed, backed-up etc. All those things that databases give you. For the sake of clarity I would use a separate auditing API.