Agora
1.2.0
Agora project
backtracer.h
Go to the documentation of this file.
1
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
2
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
3
4
#pragma once
5
6
#include <
spdlog/details/log_msg_buffer.h
>
7
#include <
spdlog/details/circular_q.h
>
8
9
#include <atomic>
10
#include <mutex>
11
#include <functional>
12
13
// Store log messages in circular buffer.
14
// Useful for storing debug data in case of error/warning happens.
15
16
namespace
spdlog
{
17
namespace
details {
18
class
SPDLOG_API
backtracer
19
{
20
mutable
std::mutex
mutex_
;
21
std::atomic<bool> enabled_{
false
};
22
circular_q<log_msg_buffer>
messages_
;
23
24
public
:
25
backtracer
() =
default
;
26
backtracer
(
const
backtracer
&other);
27
28
backtracer
(
backtracer
&&other)
SPDLOG_NOEXCEPT
;
29
backtracer
&operator=(
backtracer
other);
30
31
void
enable(
size_t
size
);
32
void
disable();
33
bool
enabled()
const
;
34
void
push_back(
const
log_msg
&msg);
35
36
// pop all items in the q and apply the given fun on each of them.
37
void
foreach_pop(
std::function
<
void
(
const
details::log_msg
&)> fun);
38
};
39
40
}
// namespace details
41
}
// namespace spdlog
42
43
#ifdef SPDLOG_HEADER_ONLY
44
# include "
backtracer-inl.h
"
45
#endif
circular_q.h
spdlog::details::backtracer::mutex_
std::mutex mutex_
Definition:
backtracer.h:20
SPDLOG_NOEXCEPT
#define SPDLOG_NOEXCEPT
Definition:
common.h:64
size
end IFFT Reshape the symbol vector into two different spatial streams size
Definition:
generate_data.m:73
spdlog::details::backtracer::messages_
circular_q< log_msg_buffer > messages_
Definition:
backtracer.h:22
backtracer-inl.h
spdlog
Definition:
async.h:25
function
function[avg_proc_duration, std_proc_duration]
Definition:
parse_dl_file.m:1
spdlog::details::log_msg
Definition:
log_msg.h:11
log_msg_buffer.h
SPDLOG_API
#define SPDLOG_API
Definition:
common.h:40
spdlog::details::backtracer
Definition:
backtracer.h:18
spdlog::details::circular_q
Definition:
circular_q.h:13
third_party
spdlog
include
spdlog
details
backtracer.h
Generated by
1.8.17