How can we help you today?
The 5 Minute Guide to Loupe Integration Print
Modified on: Thu, Jul 17, 2014 at 3:46 PM
Follow these simple steps to integrate Loupe in just 5 minutes:
- Add Loupe to your project
- Rebuild your application an run it
- Verify that Loupe is recording log data
Step 1: Add Loupe to your project
The latest version of all Loupe assemblies are available as Nuget packages that integrate with your Visual Studio project to provide the appropriate assembly references and configuration settings for Loupe. You also will generally need to call Gibraltar.Agent.Log.StartSession() when your application and starts and Gibraltar.Agent.Log.EndSession() when your application exits.
Choose from this list for specific instructions on integrating Loupe with your application type:
- ASP.NET MVC
- ASP.NET WebForms
- WPF Desktop Application
- WinForms Desktop Application
- WCF Service
- Win32 Service
- Console Application
Step 2: Rebuild your application and run it
Rebuild your application after adding Loupe and run it on a computer that has Loupe Desktop installed. Loupe Desktop is a free log viewer that can be downloaded here.
Step 3: Verify that Loupe is recording log data
While your program is running, you'll see it in the list of Live Local sessions in Loupe Desktop.
Double-click on your application in the Live Sessions list to display a Live View of your application that will update in real-time as your program runs. If you application doesn't have any log statements, you might try adding some logging for testing purposes as shown below. Loupe will also automatically log any Trace.WriteLine or Console.WriteLine statements in your program. Loupe also has integration with popular logging frameworks such as log4net and NLog.
Live View stops updating when you click on a log message so that you can see related information such as an exception stack or the associated source code. To resume real-time updates, simply click the Play button in the upper-left corner of the Live View.
To view logs after your application exits select them from under Local Sessions in Loupe Desktop.
Double-click any log to display it in the Session Viewer. The Session Viewer has powerful filtering and highlighting capabilities that make it easy to find the details you care about even in huge logs containing millions of messages.
You've integrated Loupe! If you did nothing more, you've already made your application much more maintainable. Loupe will record every unhandled exception along with the preceding trace events and dozens of useful performance metrics that will accelerate your ability to find the root causes of problems when they occur.
And don't worry about Loupe eating up all your disk space. Loupe has automatic data pruning with configurable data retention settings. By default, Loupe keeps logs for 90 days consuming a maximum of 150 MB and will stop logging when there is less then 50 MB free space available.
Did you find it helpful? Yes NoSend feedback