Behind Advent door number 19 is a simple treat - how to use Loupe with the logging capabilities of .NET.
As soon as the Loupe Agent is started within a process it begins listening to a number of sources of information, including:
- Trace Messages: Anything sent to System.Diagnostics.Trace will be routed into the Agent.
- Console Messages: If you write text to System.Console it will be copied into the Agent as well as sent on to any Console.
- Debug Messages: In a debug build anything written to System.Diagnostics.Debug will be output to any Trace listener and therefore routed to the Agent.
Since many third-party and Microsoft components send useful information to Trace Loupe automatically registers itself as a Trace Listener as soon as the agent is loaded (as well as registering to get a copy of all console messages) so there’s no configuration needed on your part. The only thing you need to worry about is that the Loupe Agent is actually started and eventually told to shut down. If you’re running in an ASP.NET application there’s nothing to do for this- the Gibraltar Agent for ASP.NET takes care of it all. Otherwise, you should explicitly start the agent early on in your application’s lifecycle and then shut it down when you’re sure your application is exiting. For details see:
- WinForms Application Setup Instructions
- WPF Application Setup Instructions
- Windows Service Setup Instructions
After that, you can freely send information strait to Trace, Debug, or Console and be sure that it’ll be captured by the Loupe Agent. If you have a third-party library that supports Trace you can enable that logging and it’ll get captured as well.
*Whew* That was easy!
Back in January of 2016 we decided to completely transition out of our data centers and into the cloud (primarily Azure). We knew we had to do something - either make some big investments in new hardware or commit ourselves to migrating everything off our own gear. After looking at... Read more
We’ve updated Loupe 4 with key improvements to managing issues, a slew of performance upgrades, and our first built-in Excel export in the web UI. If you’re a Loupe SaaS customer you’re already running 4.0.2 (just upgrade your Windows client) and if you run your own server you can download... Read more
Use SQL Elastic Pools to lower SQL Azure costs by sharing throughput between multiple databases. Designed primarily for SaaS applications this can work anywhere you have peaks and valleys in your load. Read more