<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LiveSPICE
{
    /// <summary>
    /// Interaction logic for Output.xaml
    /// </summary>
    public partial class Log : UserControl, Circuit.ILog
    {
        private static Log single;
        public static Log Instance { get { return single; } }

        public Log()
        {
            InitializeComponent();

            if (single != null)
                throw new InvalidOperationException("Multiple instances of Output");
            single = this;
        }

        public void Clear()
        {
            text.Text = "";
        }

        public void WriteLine(Circuit.MessageType Type, string Message, params object[] Format)
        {
            if (Type == Circuit.MessageType.Verbose)
                return;
            Dispatcher.Invoke(() =>
                {
                    if (Type != Circuit.MessageType.Info)
                        text.AppendText("[" + Type.ToString() + "]");
                    text.AppendText(Message + "\r\n");
                    text.ScrollToEnd();
                });
        }

        void Circuit.ILog.WriteLine(Circuit.MessageType Type, string Message, params object[] Format)
        {
            WriteLine(Type, Message, Format);
        }<commit_msg>Fixed un-substituted string format parameters<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LiveSPICE
{
    /// <summary>
    /// Interaction logic for Output.xaml
    /// </summary>
    public partial class Log : UserControl, Circuit.ILog
    {
        private static Log single;
        public static Log Instance { get { return single; } }

        public Log()
        {
            InitializeComponent();

            if (single != null)
                throw new InvalidOperationException("Multiple instances of Output");
            single = this;
        }

        public void Clear()
        {
            text.Text = "";
        }

        public void WriteLine(Circuit.MessageType Type, string Message, params object[] Format)
        {
            if (Type == Circuit.MessageType.Verbose)
                return;
            Dispatcher.Invoke(() =>
                {
                    if (Type != Circuit.MessageType.Info)
                        text.AppendText("[" + Type.ToString() + "]");
                    text.AppendText(Message + "\r\n");
                    text.ScrollToEnd();
                });
        }

        void Circuit.ILog.WriteLine(Circuit.MessageType Type, string Message, params object[] Format)
        {
            WriteLine(Type, String.Format(Message, Format));
        }
{'fraction_non_alphanumeric': 0.10462654974296946, 'fraction_numerical': 0.0, 'mean_word_length': 1.9562109025915997, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1184025', 'n_tokens_mistral': 855, 'n_tokens_neox': 811, 'n_words': 212}