<commit_before>﻿using System;
using System.Web.Http.ExceptionHandling;
using Microsoft.ApplicationInsights;

namespace AnApiOfIceAndFire.Infrastructure
{
    public class ApplicationInsightExceptionLogger : ExceptionLogger
    {
        private readonly TelemetryClient _telemetryClient;

        public ApplicationInsightExceptionLogger(TelemetryClient telemetryClient)
        {
            if (telemetryClient == null) throw new ArgumentNullException(nameof(telemetryClient));
            _telemetryClient = telemetryClient;
        }

        public override void Log(ExceptionLoggerContext context)
        {
            if (context != null && context.Exception != null)
            {
                _telemetryClient.TrackException(context.Exception);
            }

            base.Log(context);
        }
    }
}<commit_msg>More Elvis to the people<commit_after>﻿using System;
using System.Web.Http.ExceptionHandling;
using Microsoft.ApplicationInsights;

namespace AnApiOfIceAndFire.Infrastructure
{
    public class ApplicationInsightExceptionLogger : ExceptionLogger
    {
        private readonly TelemetryClient _telemetryClient;

        public ApplicationInsightExceptionLogger(TelemetryClient telemetryClient)
        {
            if (telemetryClient == null) throw new ArgumentNullException(nameof(telemetryClient));
            _telemetryClient = telemetryClient;
        }

        public override void Log(ExceptionLoggerContext context)
        {
            if (context?.Exception != null)
            {
                _telemetryClient.TrackException(context.Exception);
            }

            base.Log(context);
        }
    }
}
{'fraction_non_alphanumeric': 0.06690777576853527, 'fraction_numerical': 0.0, 'mean_word_length': 2.713646532438479, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2497858', 'n_tokens_mistral': 400, 'n_tokens_neox': 387, 'n_words': 80}