Flow 2.0.0
Flow project: Full implementation reference.
log_fwd.hpp
Go to the documentation of this file.
1/* Flow
2 * Copyright 2023 Akamai Technologies, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the
5 * "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in
12 * writing, software distributed under the License is
13 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
14 * CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing
16 * permissions and limitations under the License. */
17
18/// @file
19#pragma once
20
21#include "flow/log/log_fwd.hpp"
22#include <boost/thread.hpp>
23#include <boost/unordered_map.hpp>
24#include <vector>
25#include <map>
26#include <unordered_map>
27#include <typeinfo>
28#include <typeindex>
29
30namespace flow::log
31{
32// Types.
33
34// Find doc headers near the bodies of these compound types.
35
36class Serial_file_logger;
37template<typename Map_to_cfg_t>
38class Component_payload_type_dict_by_ptr_via_map;
39template<typename Cfg_t>
40class Component_payload_type_dict_by_ptr_via_array;
41template<typename Cfg_t>
42class Component_payload_type_dict_by_ptr_via_sorted_array;
43template<typename Map_to_cfg_t>
44class Component_payload_type_dict_by_val_via_map;
45template<typename Cfg_t>
46class Component_payload_type_dict_by_val_via_array;
47template<typename Cfg_t>
48class Component_payload_type_dict_by_val_via_sorted_array;
49template<typename Dict_by_ptr_t, typename Dict_by_val_t>
50class Component_payload_type_dict;
51
52/// Convenience alias.
53template<typename Cfg_t>
56/// Convenience alias.
57template<typename Cfg_t>
60/// Convenience alias.
61template<typename Cfg_t>
64/// Convenience alias.
65template<typename Cfg_t>
68/// Convenience alias.
69template<typename Cfg_t>
72/// Convenience alias.
73template<typename Cfg_t>
76
77// Globals.
78
79/**
80 * Thread-local Msg_metadata object used by FLOW_LOG_WITHOUT_CHECKING() for an alleged perf bonus in the
81 * synchronous-Logger code path. It is allocated at the first log call site for a given thread; and auto-deallocated
82 * when thread exits.
83 */
84extern boost::thread_specific_ptr<Msg_metadata> this_thread_sync_msg_metadata_ptr;
85
86} // namespace flow::log
An internal-use dictionary for fast lookup of small Cfg values keyed by type_info objects,...
An internal-use dictionary for fast lookup of small Cfg values keyed by type_info objects,...
Flow module providing logging functionality.
boost::thread_specific_ptr< Msg_metadata > this_thread_sync_msg_metadata_ptr
Thread-local Msg_metadata object used by FLOW_LOG_WITHOUT_CHECKING() for an alleged perf bonus in the...
Definition: log.cpp:28