<commit_before>#pragma once

#include <type_traits>
#include <tuple>
#include <ostream>

#include "blackhole/detail/traits/attributes/pack/feeder.hpp"

#include "format/message/extraction.hpp"
#include "format/message/insitu.hpp"
#include "logger.hpp"
#include "utils/format.hpp"

namespace blackhole {

namespace aux {

template<typename Log>
class scoped_pump {
    const Log& log;
    log::record_t& record;

public:
    template<typename... Args>
    scoped_pump(const Log& log, log::record_t& record, Args&&... args) :
        log(log),
        record(record)
    {
        record.attributes.insert(keyword::message() = aux::format(record.attributes, std::forward<Args>(args)...));
    }

    ~scoped_pump() {
        log.push(std::move(record));
    }

    // Using initializer lists is problematic, since GCC 4.6 has an extension which can
    // decude { { "value", "42" } } expressions in function call to the initializer list
    // without looking at the overload resolution. This violates C++11 standard, which
    // allows such deducing only for `auto` keyword (including range-based `for` loop).
    // Please, specify `attribute::list` type explicitly when using initializer lists to
    // provide attributes.
    scoped_pump& operator()(std::initializer_list<std::pair<std::string, log::attribute_value_t>>&& args) {
        for (auto it = args.begin(); it != args.end(); ++it) {<commit_msg>[Typo] Another typo. Day of typo fixes.<commit_after>#pragma once

#include <type_traits>
#include <tuple>
#include <ostream>

#include "blackhole/detail/traits/attributes/pack/feeder.hpp"

#include "format/message/extraction.hpp"
#include "format/message/insitu.hpp"
#include "logger.hpp"
#include "utils/format.hpp"

namespace blackhole {

namespace aux {

template<typename Log>
class scoped_pump {
    const Log& log;
    log::record_t& record;

public:
    template<typename... Args>
    scoped_pump(const Log& log, log::record_t& record, Args&&... args) :
        log(log),
        record(record)
    {
        record.attributes.insert(keyword::message() = aux::format(record.attributes, std::forward<Args>(args)...));
    }

    ~scoped_pump() {
        log.push(std::move(record));
    }

    // Using initializer lists is problematic, since GCC 4.6 has an extension which can
    // deduce { { "value", "42" } } expressions in function call to the initializer list
    // without looking at the overload resolution. This violates C++11 standard, which
    // allows such deducing only for `auto` keyword (including range-based `for` loop).
    // Please, specify `attribute::list` type explicitly when using initializer lists to
    // provide attributes.
    scoped_pump& operator()(std::initializer_list<std::pair<std::string, log::attribute_value_t>>&& args) {
        for (auto it = args.begin(); it != args.end(); ++it) {
{'fraction_non_alphanumeric': 0.139943741209564, 'fraction_numerical': 0.004219409282700422, 'mean_word_length': 3.7495826377295494, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3355576', 'n_tokens_mistral': 884, 'n_tokens_neox': 860, 'n_words': 240}