开发者

Logging real-time sensor's data data in the .Net

开发者 https://www.devze.com 2023-03-11 03:29 出处:网络
I need to log to file sensor\'s data of the device which is connected to my PC. It should include timestamps also. I wonder, what is the proper format to store this sort of data? So, later I can rea开

I need to log to file sensor's data of the device which is connected to my PC. It should include timestamps also. I wonder, what is the proper format to store this sort of data? So, later I can rea开发者_JAVA百科d it easily in the Notepad and parse it from the software also.


You can use log4net with a FileAppender


You could use Log4net and log either to database or to text file.

I would also consider to log to a MS Message Queue just for the sake of decoupling the sensor reads from the actual log writing, then from another process you can peek the messages and process them separately... but this really depends on how robust and fault-proof you want to make your solution...

0

精彩评论

暂无评论...
验证码 换一张
取 消