Agora
1.2.0
Agora project
|
Go to the documentation of this file.
43 std::vector<std::string>
lines()
61 std::this_thread::sleep_for(
delay_);
71 std::chrono::milliseconds
delay_{std::chrono::milliseconds::zero()};
#define ROTATING_LOG
Definition: test_file_logging.cpp:7
const SPDLOG_INLINE string_view_t & to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
Definition: common-inl.h:23
remove_cvref_t< decltype(*detail::range_begin(std::declval< Range >()))> value_type
Definition: ranges.h:226
auto format_to(OutputIt out, const text_style &ts, const S &format_str, Args &&... args) -> typename std::enable_if< enable, OutputIt >::type
Definition: color.h:628
std::string some_txt
Definition: test_pattern_formatter.cpp:362
bool try_create_dir(const spdlog::filename_t &path, const spdlog::filename_t &normalized_path)
Definition: test_create_dir.cpp:9
bool ends_with(std::string const &value, std::string const &ending)
Definition: utils.cpp:73
size_t size() const
Definition: file_helper-inl.h:122
Definition: pattern_formatter.h:23
void open(const filename_t &fname, bool truncate=false)
Definition: file_helper-inl.h:32
w
Definition: mm_gui.py:119
void require_message_count(const std::string &filename, const std::size_t messages)
Definition: utils.cpp:49
#define CHECK_THROWS_AS(expr, exceptionType)
Definition: catch.hpp:17677
@ trace
Definition: common.h:213
std::vector< std::string > lines()
Definition: test_sink.h:43
static void test_rotate(int days_to_run, uint16_t max_days, uint16_t expected_n_files)
Definition: test_daily_logger.cpp:166
std::string file_contents(const std::string &filename)
Definition: utils.cpp:24
void error(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:167
void test_pad6(std::size_t n, const char *expected)
Definition: test_fmt_helper.cpp:31
#define TEST_FILENAME
Definition: test_macros.cpp:11
std::shared_ptr< logger > rotating_logger_mt(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files, bool rotate_on_open=false, const file_event_handlers &event_handlers={})
Definition: rotating_file_sink.h:63
@ off
Definition: common.h:219
test_sink< std::mutex > test_sink_mt
Definition: test_sink.h:75
#define TEST_CASE(...)
Definition: catch.hpp:17695
SPDLOG_INLINE void sleep_for_millis(unsigned int milliseconds) SPDLOG_NOEXCEPT
Definition: os-inl.h:376
static void test_split_ext(const spdlog::filename_t::value_type *fname, const spdlog::filename_t::value_type *expect_base, const spdlog::filename_t::value_type *expect_ext)
Definition: test_file_helper.cpp:67
void format(const spdlog::details::log_msg &, const std::tm &, spdlog::memory_buf_t &dest) override
Definition: test_pattern_formatter.cpp:348
void set_formatter(std::unique_ptr< formatter > f)
Definition: logger-inl.h:84
SPDLOG_INLINE bool path_exists(const filename_t &filename) SPDLOG_NOEXCEPT
Definition: os-inl.h:187
const size_t lines_to_save
Definition: test_sink.h:21
SPDLOG_INLINE void flush_every(std::chrono::seconds interval)
Definition: spdlog-inl.h:70
@ warn
Definition: common.h:216
SPDLOG_INLINE std::shared_ptr< spdlog::logger > default_logger()
Definition: spdlog-inl.h:110
std::chrono::milliseconds delay_
Definition: test_sink.h:71
void critical(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:173
Definition: file_helper.h:16
SPDLOG_INLINE void set_level(level::level_enum log_level)
Definition: spdlog-inl.h:60
SPDLOG_INLINE void set_pattern(std::string pattern, pattern_time_type time_type)
Definition: spdlog-inl.h:30
spdlog::details::padding_info get_padding_info()
Definition: test_pattern_formatter.cpp:357
void flush_() override
Definition: test_sink.h:64
#define REQUIRE_THROWS_AS(expr, exceptionType)
Definition: catch.hpp:17663
static filename_t calc_filename(const filename_t &filename, const tm &now_tm)
Definition: daily_file_sink.h:31
void reopen(bool truncate)
Definition: file_helper-inl.h:76
custom_test_flag(std::string txt)
Definition: test_pattern_formatter.cpp:344
void sink_it_(const details::log_msg &msg) override
Definition: test_sink.h:50
void debug(format_string_t< Args... > fmt, Args &&... args)
Definition: logger.h:150
test_sink< details::null_mutex > test_sink_st
Definition: test_sink.h:76
std::function< void(const filename_t &filename, std::FILE *file_stream)> before_close
Definition: common.h:312
Pilot RX by socket threads(=reference time)
@ info
Definition: common.h:215
SPDLOG_INLINE spdlog::log_clock::time_point now() SPDLOG_NOEXCEPT
Definition: os-inl.h:71
level_enum
Definition: common.h:211
@ debug
Definition: common.h:214
void set_level(level::level_enum log_level)
Definition: logger-inl.h:67
void enable_backtrace(size_t n_messages)
Definition: logger-inl.h:108
std::vector< std::string > lines_
Definition: test_sink.h:72
std::size_t count_files(const std::string &folder)
Definition: utils.cpp:109
static const char *const tested_logger_name2
Definition: test_registry.cpp:4
SPDLOG_INLINE void set_automatic_registration(bool automatic_registration)
Definition: spdlog-inl.h:105
void warn(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:161
@ err
Definition: common.h:217
Definition: mpmc_blocking_q.h:22
static spdlog::details::log_msg create_msg(std::chrono::seconds offset)
Definition: test_daily_logger.cpp:158
void log(const details::log_msg &msg) final
Definition: base_sink-inl.h:26
details::dump_info< typename Container::const_iterator > to_hex(const Container &container, size_t size_per_line=32)
Definition: bin_to_hex.h:72
std::chrono::system_clock log_clock
Definition: common.h:126
void dump_backtrace()
Definition: logger-inl.h:119
#define SIMPLE_LOG
Definition: test_file_logging.cpp:6
SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT
Definition: common-inl.h:33
filename
Definition: parse_all_dl.m:14
Definition: test_errors.cpp:45
static milliseconds millis_from(const test_clock::time_point &tp0)
Definition: test_mpmc_q.cpp:6
auto runtime(const S &s) -> basic_runtime< char_t< S >>
Definition: core.h:3098
std::unique_ptr< custom_flag_formatter > clone() const override
Definition: test_pattern_formatter.cpp:364
void close()
Definition: file_helper-inl.h:93
static void write_with_helper(file_helper &helper, size_t howmany)
Definition: test_file_helper.cpp:10
SPDLOG_INLINE bool create_dir(const filename_t &path)
Definition: os-inl.h:545
SPDLOG_INLINE void apply_all(const std::function< void(std::shared_ptr< logger >)> &fun)
Definition: spdlog-inl.h:85
void set_delay(std::chrono::milliseconds delay)
Definition: test_sink.h:36
Definition: test_errors.cpp:11
void fputs(const Char *chars, FILE *stream)
Definition: color.h:478
Definition: test_sink.h:19
#define SPDLOG_LOGGER_TRACE(logger,...)
Definition: spdlog.h:294
static filename_t calc_filename(const filename_t &filename, std::size_t index)
Definition: rotating_file_sink-inl.h:55
#define SPDLOG_TRACE(...)
Definition: spdlog.h:295
#define SIMPLE_LOG
Definition: test_errors.cpp:8
Definition: base_sink.h:19
#define SIMPLE_ASYNC_LOG
Definition: test_errors.cpp:9
#define SPDLOG_LOGGER_DEBUG(logger,...)
Definition: spdlog.h:302
const SPDLOG_INLINE char * to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT
Definition: common-inl.h:28
void flush_() final
Definition: test_errors.cpp:19
const filename_t & filename() const
Definition: file_helper-inl.h:131
for i
Definition: generate_data.m:107
auto to_string(const T &value) -> std::string
Definition: format.h:2882
#define REQUIRE(...)
Definition: catch.hpp:17659
auto begin() -> T *
Definition: core.h:813
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
#define SPDLOG_DEBUG(...)
Definition: spdlog.h:303
void test_pad9(std::size_t n, const char *expected)
Definition: test_fmt_helper.cpp:43
SPDLOG_INLINE std::tm localtime(const std::time_t &time_tt) SPDLOG_NOEXCEPT
Definition: os-inl.h:84
SPDLOG_INLINE void drop(const std::string &name)
Definition: spdlog-inl.h:90
bool dequeue_for(T &popped_item, std::chrono::milliseconds wait_duration)
Definition: mpmc_blocking_q.h:54
static const char *const tested_logger_name
Definition: test_registry.cpp:3
l1
Definition: parse_all_dl.m:58
Definition: daily_file_sink.h:115
end start
Definition: inspect_agora_results.m:95
SPDLOG_INLINE std::shared_ptr< logger > get(const std::string &name)
Definition: spdlog-inl.h:20
#define TEST_FILENAME
Definition: test_async.cpp:6
daily_file_sink< details::null_mutex > daily_file_sink_st
Definition: daily_file_sink.h:256
#define TEST_FILENAME
Definition: test_file_helper.cpp:6
void load_argv_levels(int argc, const char **argv)
Definition: argv.h:24
std::size_t get_filesize(const std::string &filename)
Definition: utils.cpp:61
void pad3(T n, memory_buf_t &dest)
Definition: fmt_helper.h:126
auto end() -> T *
Definition: core.h:814
void append(const ContiguousRange &range)
Definition: format.h:771
void info(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:155
void write(const memory_buf_t &buf)
Definition: file_helper-inl.h:112
void set_formatter(std::unique_ptr< spdlog::formatter > sink_formatter) final
Definition: base_sink-inl.h:47
void trace(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:143
SPDLOG_INLINE void register_logger(std::shared_ptr< logger > logger)
Definition: spdlog-inl.h:80
size_t flush_counter_
Definition: test_sink.h:70
static spdlog::filename_t calc_filename(const spdlog::filename_t &basename, const tm &now_tm)
Definition: test_daily_logger.cpp:54
Definition: test_daily_logger.cpp:52
SPDLOG_INLINE void set_default_logger(std::shared_ptr< spdlog::logger > default_logger)
Definition: spdlog-inl.h:120
std::string log_info(const T &what, spdlog::level::level_enum logger_level=spdlog::level::info)
Definition: test_misc.cpp:6
#define SPDLOG_FILENAME_T(s)
Definition: common.h:123
void flush()
Definition: file_helper-inl.h:85
void info(format_string_t< Args... > fmt, Args &&... args)
Definition: logger.h:156
void prepare_logdir()
Definition: utils.cpp:10
int count_lines(const char *filename)
Definition: async_bench.cpp:41
std::chrono::high_resolution_clock test_clock
Definition: test_mpmc_q.cpp:4
function[avg_proc_duration, std_proc_duration]
Definition: parse_dl_file.m:1
std::function< void(const filename_t &filename, std::FILE *file_stream)> after_open
Definition: common.h:311
size_t msg_counter()
Definition: test_sink.h:24
static const SPDLOG_CONSTEXPR char * default_eol
Definition: os.h:32
std::function< void(const filename_t &filename)> after_close
Definition: common.h:313
void test_pad3(uint32_t n, const char *expected)
Definition: test_fmt_helper.cpp:19
pattern_time_type
Definition: common.h:267
fmt::basic_memory_buffer< char, 250 > memory_buf_t
Definition: common.h:155
std::shared_ptr< spdlog::details::thread_pool > thread_pool()
Definition: async.h:95
#define REQUIRE_FALSE(...)
Definition: catch.hpp:17660
void load_env_levels()
Definition: env.h:28
size_t msg_counter_
Definition: test_sink.h:69
Definition: test_pattern_formatter.cpp:341
dup_filter_sink< details::null_mutex > dup_filter_sink_st
Definition: dup_filter_sink.h:91
std::function< void(const filename_t &filename)> before_open
Definition: common.h:310
#define INFO(msg)
Definition: catch.hpp:17690
size_t flush_counter()
Definition: test_sink.h:30
l
Definition: parse_all_dl.m:71
std::shared_ptr< logger > null_logger_st(const std::string &logger_name)
Definition: null_sink.h:37
std::string filename_t
Definition: common.h:122
@ critical
Definition: common.h:218
size_t width_
Definition: pattern_formatter.h:44
SPDLOG_INLINE void drop_all()
Definition: spdlog-inl.h:95
void debug(format_string_t< Args... > fmt, Args &&... args)
Definition: spdlog.h:149
void pad6(T n, memory_buf_t &dest)
Definition: fmt_helper.h:143
void init_thread_pool(size_t q_size, size_t thread_count, std::function< void()> on_thread_start, std::function< void()> on_thread_stop)
Definition: async.h:76
void pad2(int n, memory_buf_t &dest)
Definition: fmt_helper.h:101
void sink_it_(const spdlog::details::log_msg &) final
Definition: test_errors.cpp:14
SPDLOG_INLINE filename_t dir_name(const filename_t &path)
Definition: os-inl.h:584
std::string format(const T &value)
Definition: utils.h:15
dup_filter_sink< std::mutex > dup_filter_sink_mt
Definition: dup_filter_sink.h:90
void set_pattern(std::string pattern, pattern_time_type time_type=pattern_time_type::local)
Definition: logger-inl.h:101
void pad9(T n, memory_buf_t &dest)
Definition: fmt_helper.h:149
void test_pad2(int n, const char *expected)
Definition: test_fmt_helper.cpp:7