[MOS-424] Improvement of logger module

Due to losing bytes the logger has a worker
which is responsible for dumping logs to
the file. The logger also has its own timer
to dump logs every 15 minutes. EventManager
is not responsible for interval dumping logs
now.
This commit is contained in:
Dawid Wojtas
2022-09-06 10:56:25 +02:00
committed by Dawid Wojtas
parent 0b46a9286a
commit e77b5d6702
20 changed files with 287 additions and 76 deletions

View File

@@ -10,7 +10,7 @@
#include "thread.hpp"
#include "ticks.hpp"
#include "critical.hpp"
#include <algorithm>
#include "Logger.hpp"
#include <service-evtmgr/KbdMessage.hpp>
#include <service-evtmgr/BatteryMessages.hpp>
#include <service-evtmgr/Constants.hpp>
@@ -34,6 +34,8 @@
#include <module-gui/gui/Common.hpp>
#include <service-eink/Common.hpp>
#include <algorithm>
const inline size_t systemManagerStack = 4096 * 2;
namespace sys
@@ -115,6 +117,8 @@ namespace sys
this, "lowBatteryShutdownDelay", lowBatteryShutdownDelayTime, [this](sys::Timer &) {
CloseSystemHandler(CloseReason::LowBattery);
});
Log::Logger::get().createTimer(this);
}
SystemManagerCommon::~SystemManagerCommon()