<commit_before>#ifndef NITRO_LOG_MIN_SEVERITY
#error "NITRO_LOG_MIN_SEVERITY should be set by the build system, but isn't!"
#endif

#define CATCH_CONFIG_MAIN
#include <catch.hpp>

#ifdef NITRO_LOG_MIN_SEVERITY
#undef NITRO_LOG_MIN_SEVERITY
#endif
#define NITRO_LOG_MIN_SEVERITY info

#include <nitro/log/attribute/severity.hpp>
#include <nitro/log/filter/severity_filter.hpp>
#include <nitro/log/log.hpp>
#include <nitro/log/sink/sequence.hpp>
#include <nitro/log/sink/stderr.hpp>
#include <nitro/log/sink/syslog.hpp>

namespace detail
{

using Sink = nitro::log::sink::sequence<nitro::log::sink::Syslog, nitro::log::sink::StdErr>;

typedef nitro::log::record<nitro::log::tag_attribute, nitro::log::message_attribute,
                           nitro::log::severity_attribute>
    record;

template <typename Record>
class log_formater
{
public:
    std::string format(Record& r)
    {
        std::stringstream s;

        s << "[";

        if (!r.tag().empty())
        {
            s << r.tag() << "][";
        }

        s << r.severity() << "]: " << r.message() << "\n";

        return s.str();
    }
};

template <typename Record>
using log_filter = nitro::log::filter::severity_filter<Record>;<commit_msg>Kann das auch Vindovs?<commit_after>#ifndef NITRO_LOG_MIN_SEVERITY
#error "NITRO_LOG_MIN_SEVERITY should be set by the build system, but isn't!"
#endif

#define CATCH_CONFIG_MAIN
#include <catch.hpp>

#ifdef NITRO_LOG_MIN_SEVERITY
#undef NITRO_LOG_MIN_SEVERITY
#endif
#define NITRO_LOG_MIN_SEVERITY info

#include <nitro/log/attribute/severity.hpp>
#include <nitro/log/filter/severity_filter.hpp>
#include <nitro/log/log.hpp>
#include <nitro/log/sink/sequence.hpp>
#include <nitro/log/sink/stderr.hpp>
#include <nitro/log/sink/stdout.hpp>

namespace detail
{

using Sink = nitro::log::sink::sequence<nitro::log::sink::StdOut, nitro::log::sink::StdErr>;

typedef nitro::log::record<nitro::log::tag_attribute, nitro::log::message_attribute,
                           nitro::log::severity_attribute>
    record;

template <typename Record>
class log_formater
{
public:
    std::string format(Record& r)
    {
        std::stringstream s;

        s << "[";

        if (!r.tag().empty())
        {
            s << r.tag() << "][";
        }

        s << r.severity() << "]: " << r.message() << "\n";

        return s.str();
    }
};

template <typename Record>
using log_filter = nitro::log::filter::severity_filter<Record>;
{'fraction_non_alphanumeric': 0.1552642359688652, 'fraction_numerical': 0.0, 'mean_word_length': 3.8452380952380953, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 27, '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': '2189725', 'n_tokens_mistral': 906, 'n_tokens_neox': 871, 'n_words': 156}