<commit_before>using System;
using NuKeeper.Abstractions.Logging;

namespace NuKeeper.Inspection.Logging
{
    public class ConfigurableLogger : INuKeeperLogger, IConfigureLogger
    {
        private IInternalLogger _inner;

        public void Initialise(LogLevel logLevel, LogDestination destination, string filePath)
        {
            _inner = CreateLogger(logLevel, destination, filePath);
        }

        public void Error(string message, Exception ex)
        {
            CheckLoggerCreated();
            _inner.LogError(message, ex);
            if (ex.InnerException != null)
            {
                Error("Inner Exception", ex.InnerException);
            }
        }

        public void Minimal(string message)
        {
            CheckLoggerCreated();
            _inner.Log(LogLevel.Minimal, message);<commit_msg>Fix crash with null exception (#578)<commit_after>using System;
using NuKeeper.Abstractions.Logging;

namespace NuKeeper.Inspection.Logging
{
    public class ConfigurableLogger : INuKeeperLogger, IConfigureLogger
    {
        private IInternalLogger _inner;

        public void Initialise(LogLevel logLevel, LogDestination destination, string filePath)
        {
            _inner = CreateLogger(logLevel, destination, filePath);
        }

        public void Error(string message, Exception ex)
        {
            CheckLoggerCreated();
            _inner.LogError(message, ex);
            if (ex?.InnerException != null)
            {
                Error("Inner Exception", ex.InnerException);
            }
        }

        public void Minimal(string message)
        {
            CheckLoggerCreated();
            _inner.Log(LogLevel.Minimal, message);
{'fraction_non_alphanumeric': 0.07817969661610269, 'fraction_numerical': 0.001750291715285881, 'mean_word_length': 2.2116104868913857, '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': '2552398', 'n_tokens_mistral': 445, 'n_tokens_neox': 428, 'n_words': 100}