Added info about product, OS version, commit hash
and serial number to log filename to simplify
triage and quick sanity check of the logs in
cases many log files have to be analyzed.
Fixes and optimizations in logger:
* fixed possible buffer overflow when logging
logs over line buffer size;
* reduced max log line length to 2048;
* moved pubsetbuf before file opening;
* log file stream buffer created once
in logger ctor;
* updatet UTs;
* additional minor cleanup.
Gets data from freertos and prints on frequency change depending
if it's important. Gathering is not costly, printing is though.
For less intrusive checks I would rather disable names gathering
as in worst case scenario it hangs rtos context switching till
thread id is found.
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Because `vsnprintf` return value means:
"
The number of characters that would have been
written if n had been sufficiently large,
not counting the terminating null character.
If an encoding error occurs, a negative number is returned.
"
`Logger` crashed when log msg was longer than LOGGER_BUFFER_SIZE.
Checking `vsnprintf` return value solves this issue.