update spdlog (it still dont work), fix 6.3(1)

This commit is contained in:
Gray
2024-06-10 16:30:29 -04:00
parent dd2bbfacda
commit bab7c30669
107 changed files with 10351 additions and 9620 deletions

View File

@@ -3,20 +3,19 @@
#pragma once
#include <spdlog/details/log_msg_buffer.h>
#include <spdlog/details/circular_q.h>
#include <spdlog/details/log_msg_buffer.h>
#include <atomic>
#include <mutex>
#include <functional>
#include <mutex>
// Store log messages in circular buffer.
// Useful for storing debug data in case of error/warning happens.
namespace spdlog {
namespace details {
class SPDLOG_API backtracer
{
class SPDLOG_API backtracer {
mutable std::mutex mutex_;
std::atomic<bool> enabled_{false};
circular_q<log_msg_buffer> messages_;
@@ -32,14 +31,15 @@ public:
void disable();
bool enabled() const;
void push_back(const log_msg &msg);
bool empty() const;
// pop all items in the q and apply the given fun on each of them.
void foreach_pop(std::function<void(const details::log_msg &)> fun);
};
} // namespace details
} // namespace spdlog
} // namespace details
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
# include "backtracer-inl.h"
#include "backtracer-inl.h"
#endif