Adding Version Information to your Log

Time for a new crisp feature on elmah.io. All software applications have a version number (or at least should have). Being able to distinguish one version from the other is important. That's why we have implemented version number support on elmah.io.

Basically, there's a new version property on the message details:

Error Details with Version Number

The idea here is that you set this version number to the current version number of your application through appSettings, assembly version or similar.

Having a version number on all messages, lets you do funky searches like this:

Search for Versions

To add a version number on all of the messages logged to elmah.io, add the following code somewhere during initialization:

Elmah.ErrorLog.GetDefault(null); // Forces creation of logger client
var logger = ErrorLog.Client;
logger.OnMessage += (sender, args) =>
{
    args.Message.Version = "1.2.3"; // Requires elmah.io.core version >= 2.0.26
}

I addition to setting the version number through the OnMessage event, there are alternatives as well as support for logging frameworks like log4net, NLog and Serilog. Check out the Adding Version Information article on our documentation site for more details.



Features steps
We monitor your websites

We monitor your websites

We monitor your websites for crashes and availability. This helps you get an overview of the quality of your applications and to spot trends in your releases.

We notify you

We notify you

We notify you when errors starts happening using Slack, HipChat, mail or other forms of communication to help you react to errors before your users do.

We help you fix bugs

We help you fix bugs

We help you fix bugs quickly by combining error diagnostic information with innovative quick fixes and answers from Stack Overflow and social media.

See how we can help you monitor your website for crashes Monitor your website