Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log actions in compact framework?

I'm working on a windows mobile project using compact framework.

One thing I have to do is log when users perform actions, this can mean any action from pressing a button to using the barcode scanner. The time it happened also needs to be logged.

My plan is to override all controls to include logging functionality built into them but this might not be the right way to go about it, seems like a very tedious thing to do..

Is there a better way?

like image 842
meds Avatar asked Oct 06 '22 04:10

meds


1 Answers

I would go with IL Weaving. Here is a library that I would recommend: http://www.sharpcrafters.com/aop.net/msil-injection What it does is that you mark your class with an attribute and you can intercept all function calls. In this interception you would put in your logging logic.

like image 170
basarat Avatar answered Oct 13 '22 10:10

basarat