Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing output of multiple .Net console apps in one place

I have a C# console app which I'm deploying around 20 times (with different config settings) and running. As you might imagine it's hard to keep an eye on what's happening with 20 apps running (I'm eventually going to deploy these as windows services), so is there anything that can show the output of these in one place easily?

I've thought about log files but these could get big quite fast, and it is a lot of files to open and look at - I just want to have some output to check things are still running as expected.

Edit:

I'm going to be writing errors and stop/start information to the database. What I'm talking about here is the general processing information, which isn't all that relevant to revisit, but interesting to look at while its running in the console app.

like image 865
finoutlook Avatar asked Sep 20 '11 11:09

finoutlook


2 Answers

I have successfully used log4net and its configurable UdpAppender. Then you can point all the UdpAppenders to a single machine where you can receive the Udp messages with Log4View for example.

Since it's configurable, you can use it when you install and debug in production and then increase the logging level to only output ERROR messages instead of DEBUG or INFO messages.

http://logging.apache.org/log4net/

http://www.log4view.com

http://logging.apache.org/log4net/release/config-examples.html

like image 146
Mikael Östberg Avatar answered Nov 10 '22 00:11

Mikael Östberg


Maybe because I come from a heavy DB background, but how about using SQL Server with a Log table to track activity across different apps?

DBs are geared up towards concurrency and will easily handle multiple applications inserting data into the same Log table, also you get the options of slicing and dicing through the data as much as you would like, taking advantage of the already existing aggregation functions in a DB environment.

If you go down that route, you will probably need to consider maintaining that table (Log retention period, etc.).

You could also potentially start using tools such as Splunk to collate all the log data, and start corresponding app failures to system or environment failures (if these are being tracked).

like image 35
ToOsIK Avatar answered Nov 10 '22 01:11

ToOsIK