<commit_before>using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.Extensions.Logging;

namespace OrchardCore.DisplayManagement.Notify
{
    public class Notifier : INotifier
    {
        private readonly IList<NotifyEntry> _entries;
        private readonly ILogger _logger;

        public Notifier(ILogger<Notifier> logger)
        {
            _entries = new List<NotifyEntry>();
            _logger = logger;
        }

        [Obsolete("This method will be removed in a later version. Use AddAsync()")]
        // TODO The implementation for this is provided as an interface default implementation
        // when the interface method is removed, replace this with AddAsync.
        public void Add(NotifyType type, LocalizedHtmlString message)
        {
            if (_logger.IsEnabled(LogLevel.Information))
            {
                _logger.LogInformation("Notification '{NotificationType}' with message '{NotificationMessage}'", type, message);
            }

            _entries.Add(new NotifyEntry { Type = type, Message = message });
        }

        public IList<NotifyEntry> List()
        {
            return _entries;
        }
    }
}<commit_msg>Fix logging of the notification message (#10321)<commit_after>using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.Extensions.Logging;

namespace OrchardCore.DisplayManagement.Notify
{
    public class Notifier : INotifier
    {
        private readonly IList<NotifyEntry> _entries;
        private readonly ILogger _logger;

        public Notifier(ILogger<Notifier> logger)
        {
            _entries = new List<NotifyEntry>();
            _logger = logger;
        }

        [Obsolete("This method will be removed in a later version. Use AddAsync()")]
        // TODO The implementation for this is provided as an interface default implementation
        // when the interface method is removed, replace this with AddAsync.
        public void Add(NotifyType type, LocalizedHtmlString message)
        {
            if (_logger.IsEnabled(LogLevel.Information))
            {
                _logger.LogInformation("Notification '{NotificationType}' with message '{NotificationMessage}'", type, message.Value);
            }

            _entries.Add(new NotifyEntry { Type = type, Message = message });
        }

        public IList<NotifyEntry> List()
        {
            return _entries;
        }
    }
}
{'fraction_non_alphanumeric': 0.08051016341171782, 'fraction_numerical': 0.0019928258270227183, 'mean_word_length': 2.4764542936288088, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5325041', 'n_tokens_mistral': 612, 'n_tokens_neox': 601, 'n_words': 184}