src/log_service.cpp
0.0% Lines (0/10)
0.0% List of functions (0/5)
-% Branches (0/0)
Functions (5)
Function
Calls
Lines
Blocks
boost::beast2::(anonymous namespace)::log_service_impl::log_service_impl(boost::capy::execution_context&)
:27
0
0.0%
0.0%
boost::beast2::(anonymous namespace)::log_service_impl::get_section(boost::core::basic_string_view<char>)
:32
0
0.0%
0.0%
boost::beast2::(anonymous namespace)::log_service_impl::get_sections() const
:39
0
0.0%
0.0%
boost::beast2::(anonymous namespace)::log_service_impl::shutdown()
:45
0
0.0%
0.0%
boost::beast2::use_log_service()
:54
0
0.0%
0.0%
| Line | TLA | Hits | Source Code |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
| 3 | // | ||
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/cppalliance/beast2 | ||
| 8 | // | ||
| 9 | |||
| 10 | #include <boost/beast2/log_service.hpp> | ||
| 11 | #include <boost/beast2/logger.hpp> | ||
| 12 | #include <boost/capy/ex/system_context.hpp> | ||
| 13 | |||
| 14 | namespace boost { | ||
| 15 | namespace beast2 { | ||
| 16 | |||
| 17 | namespace { | ||
| 18 | |||
| 19 | class log_service_impl | ||
| 20 | : public log_service | ||
| 21 | , public capy::execution_context::service | ||
| 22 | { | ||
| 23 | public: | ||
| 24 | using key_type = log_service; | ||
| 25 | |||
| 26 | explicit | ||
| 27 | ✗ | log_service_impl(capy::execution_context&) noexcept | |
| 28 | ✗ | { | |
| 29 | ✗ | } | |
| 30 | |||
| 31 | section | ||
| 32 | ✗ | get_section( | |
| 33 | core::string_view name) override | ||
| 34 | { | ||
| 35 | ✗ | return ls_.get(name); | |
| 36 | } | ||
| 37 | |||
| 38 | auto | ||
| 39 | ✗ | get_sections() const noexcept -> | |
| 40 | std::vector<section> override | ||
| 41 | { | ||
| 42 | ✗ | return ls_.get_sections(); | |
| 43 | } | ||
| 44 | |||
| 45 | ✗ | void shutdown() override {} | |
| 46 | |||
| 47 | private: | ||
| 48 | log_sections ls_; | ||
| 49 | }; | ||
| 50 | |||
| 51 | } // (anon) | ||
| 52 | |||
| 53 | log_service& | ||
| 54 | ✗ | use_log_service() | |
| 55 | { | ||
| 56 | ✗ | return capy::get_system_context().use_service<log_service_impl>(); | |
| 57 | } | ||
| 58 | |||
| 59 | } // beast2 | ||
| 60 | } // boost | ||
| 61 |