GCC Code Coverage Report


Directory: libs/beast2/
File: src/log_service.cpp
Date: 2025-11-13 15:50:44
Exec Total Coverage
Lines: 0 6 0.0%
Functions: 0 3 0.0%
Branches: 0 0 -%

Line Branch Exec Source
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
13 namespace boost {
14 namespace beast2 {
15
16 namespace {
17
18 class log_service_impl
19 : public log_service
20 {
21 public:
22 using key_type = log_service;
23
24 section
25 get_section(
26 core::string_view name) override
27 {
28 return ls_.get(name);
29 }
30
31 auto
32 get_sections() const noexcept ->
33 std::vector<section> override
34 {
35 return ls_.get_sections();
36 }
37
38 private:
39 log_sections ls_;
40 };
41
42 } // (anon)
43
44 log_service&
45 use_log_service(
46 polystore& ps)
47 {
48 return ps.try_emplace<log_service_impl>();
49 }
50
51 } // beast2
52 } // boost
53