Design for remote debugging and status checking
I have an application that runs on a headless linux box (a SheevaPlug, to be precise). (It collects data from a weather station and sends it to a database, in case you're wondering.) I'm having a hard time debugging problems with the application because I can only SSH into the box or view it on the network (thanks to Samba).开发者_如何学Python
I could log everything to a file, but I'm space-limited and want to prevent the log file from growing too large (I know I can use logrotate
, but I haven't been able to get it to work correctly with the log file). I'm currently developing the app in C# 3.5 and running it with Mono as a service.
I'm trying to figure out what a good architecture would be for this type of application, wherein one part runs as a service and another part communicates with that service to get status/debug information. I'm thinking about using inter-process communication, Aspect-Oriented Programming, or just making the most of NLog's configuration abilities (I'm using NLog for logging). Or maybe I should turn the app into a web service and create a client to access it.
Any advice?
Write the log on a socket and have another computer of the network connect and read from it.
精彩评论