Support for Logary

Supporting all of the major logging and error management solutions for .NET is a high priority on elmah.io. Whether you use ELMAH or simple logging solutions like log4net and Serilog, you should get a great experience combining them with elmah.io. As the first online error management system out there, we recently released support for the up-and-coming logging library Logary. Logary is primarily written in F#, but supports all of the languages available on the .NET platform.

To start logging to elmah.io from Logary, install the Logary.Targets.Elmah.Io package. Be aware that there's a Logary.Targets.ElmahIO package as well. That's for the old version of Logary. Then add some code:

using (var logary = LogaryFactory.New("Logary.CSharpExample", with => with
    .Target<Targets.ElmahIO.Builder>(
        "elmah.io",
        conf => conf.Target.WithLogId(Guid.Parse("LOG_ID")))).Result)
{
    var logger = logary.GetLogger("Logary.CSharpExample");

    try
    {
        throw new ApplicationException("thing went haywire");
    }
    catch (Exception e)
    {
        logger.LogEventFormat(LogLevel.Fatal, "Unhandled {exception}!", e);
    }
}

The example is written in C# since we know that most of you are C# programmers. To see a similar example in F#, check out our Logary documentation as well as the F# and C# examples in the Logary source code.

Try Logary today; get started by doing Install-Package Logary.Targets.Elmah.Io.

elmah.io: Error logging and Uptime Monitoring for your web apps

This blog post is brought to you by elmah.io. elmah.io is error logging, uptime monitoring, deployment tracking, and service heartbeats for your .NET and JavaScript applications. Stop relying on your users to notify you when something is wrong or dig through hundreds of megabytes of log files spread across servers. With elmah.io, we store all of your log messages, notify you through popular channels like email, Slack, and Microsoft Teams, and help you fix errors fast.

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