Can you use Gibraltar with Outlook Add-ins?

Recently a customer asked us if it were possible to use Gibraltar with Outlook Add-ins. Whilst the short answer is “yes”, the longer answer is “yes, but you have to remember a few things”. Since this is important information, we thought it should be a blog post too, that way you can all have access to the information.

So, these are the things you have to bare in mind if you are using Gibraltar with Outlook Add-ins:

  1. Deployment

Be sure to deploy the Gibraltar Package utility (EXE) along with the Gibraltar Agent (DLL). This utility allows transfer of logs to Gibraltar Hub to occur in an external process independent of the Outlook client once Outlook exits.

  1. .NET. Framework

Gibraltar requires the .NET framework, but if your add-in is written for .NET, you already have this dependency. Depending on whether your building against .NET 4 (or beyond) or an earlier version of .NET (starting with .NET 2 SP1), choose between two versions of our the Gibraltar Packager utility. Likewise, there are two versions of our PostSharp assemblies if you’re using our AOP extensions.

  1. Initialization / Shutdown

Be sure to call Log.StartSession in the initialization logic for your add-in and call Log.EndSession in your shutdown logic.

IMPORTANT: Be sure to register for the Log.Initialize event prior to calling Log.StartSession and do all your Gibraltar initialization in your Initialization handler.

  1. Log Transmission

In addition to configuring Gibraltar to autosend logs on application exit, you should register for the [Recently a customer asked us if it were possible to use Gibraltar with Outlook Add-ins. Whilst the short answer is “yes”, the longer answer is “yes, but you have to remember a few things”. Since this is important information, we thought it should be a blog post too, that way you can all have access to the information.

So, these are the things you have to bare in mind if you are using Gibraltar with Outlook Add-ins:

  1. Deployment

Be sure to deploy the Gibraltar Package utility (EXE) along with the Gibraltar Agent (DLL). This utility allows transfer of logs to Gibraltar Hub to occur in an external process independent of the Outlook client once Outlook exits.

  1. .NET. Framework

Gibraltar requires the .NET framework, but if your add-in is written for .NET, you already have this dependency. Depending on whether your building against .NET 4 (or beyond) or an earlier version of .NET (starting with .NET 2 SP1), choose between two versions of our the Gibraltar Packager utility. Likewise, there are two versions of our PostSharp assemblies if you’re using our AOP extensions.

  1. Initialization / Shutdown

Be sure to call Log.StartSession in the initialization logic for your add-in and call Log.EndSession in your shutdown logic.

IMPORTANT: Be sure to register for the Log.Initialize event prior to calling Log.StartSession and do all your Gibraltar initialization in your Initialization handler.

  1. Log Transmission

In addition to configuring Gibraltar to autosend logs on application exit, you should register for the](https://doc.onloupe.com/webframe.html#DevelopersReference_Log_MessageAlert.html) to allow log to be sent automatically when events occur in your add-in. Log files will automatically be sent when they roll over - once a day or after 20MB of data by default (but you can tune that in your configuration)

  1. User Opt In

Depending upon your privacy policy and other agreements with your customers, you may want to include opt-in logic within your add-in to give your customers the choice to opt-in or opt-out of having Gibraltar log data be transmitted. See our doc for details on some built-in features we provide to assist with user opt-in.

Remember these things and you should have no trouble using Gibraltar with Outlook Add-ins.

Well, that’s all for this post, until next time, happy coding! Smile

Rock solid centralized logging

Unlimited applications, unlimited errors, scalable from solo startup to enterprise.