I have a Complex Service that i am working with, and as with all windows services, there is no Console to read any debug messages, or anything like that, so you would have to log all messages to a text file... i'm wanting to write in a small TCP Server (or UDP or NamedPipe doesn't really matter), where i can have a debug application...so basically, the service runs all the time and has this listener / server (Tcp or otherwise) and is always writing Debug messages to the server, if i need to debug the server, i should be able to connect to it using a TCP Client (or whatever protocol) and read any debug messages, or anything where i would typically use Console.WriteLine("Message");
i know this seems like a crazy idea, but it's something I've been considering and needed some input on...
my basic problem is that i can write a TCP Server into the Service, but i am unsure how to pass the messages to it all the time, or only when a client is connected, any advice or examples would be greatly appreciated.
Note: I am using C# and would like to stick to that language.