...one of the most highly regarded and expertly designed C++ library projects in the world. — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards
...one of the most highly regarded and expertly designed C++ library projects in the world.
boost::log::sinks::file::file_name_composer_adapter
// In header: <boost/log/sinks/text_multifile_backend.hpp> template<typename FormatterT> class file_name_composer_adapter { public: // types typedef filesystem::path result_type; // Functor result type. typedef result_type::string_type::value_type native_char_type; // File name character type. typedef FormatterT formatter_type; // The adopted formatter type. typedef basic_formatting_ostream< native_char_type > stream_type; // Formatting stream type. // construct/copy/destruct explicit file_name_composer_adapter(formatter_type const &, std::locale const & = std::locale()); file_name_composer_adapter(file_name_composer_adapter const &); file_name_composer_adapter & operator=(file_name_composer_adapter const &); // public member functions result_type operator()(record_view const &) const; };
Класс адаптера, который позволяет использовать обычные формататоры в качестве генераторов имен файлов.
file_name_composer_adapter
explicitfile_name_composer_adapterformatter_type&std::locale ;
Инициирующий конструктор
file_name_composer_adapter(file_name_composer_adapter const & that;
Конструктор копий
file_name_composer_adapter & оператор=(file_name_composer_adapter конст &, что;
Назначение
result_type оператор()record_view const & rec) const;
Оператор генерирует имя файла на основе записи журнала
Статья Class template file_name_composer_adapter раздела Chapter 1. Boost.Log v2 Sinks может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: Sinks ::
реклама