show # messages, use msgpack to compress json

This commit is contained in:
proddy
2021-06-16 20:31:35 +02:00
parent 19b37d9e0e
commit 7e7bd29c9a
9 changed files with 71 additions and 58 deletions

View File

@@ -34,7 +34,7 @@ namespace emsesp {
class WebLogService : public uuid::log::Handler {
public:
static constexpr size_t MAX_LOG_MESSAGES = 50;
static constexpr size_t MAX_LOG_MESSAGES = 30;
WebLogService(AsyncWebServer * server, SecurityManager * securityManager);
@@ -71,8 +71,8 @@ class WebLogService : public uuid::log::Handler {
uint64_t last_transmit_ = 0; // Last transmit time
size_t maximum_log_messages_ = MAX_LOG_MESSAGES; // Maximum number of log messages to buffer before they are output
unsigned long log_message_id_ = 0; // The next identifier to use for queued log messages
unsigned long log_message_id_tail_ = 0;
std::list<QueuedLogMessage> log_messages_; // Queued log messages, in the order they were received
unsigned long log_message_id_tail_ = 0; // last event shown on the screen after fetch
std::list<QueuedLogMessage> log_messages_; // Queued log messages, in the order they were received
};
} // namespace emsesp