Commit Graph

5 Commits

Author SHA1 Message Date
Flavio Ceolin 8153666a27 logging: Fix 14.4 guideline violation
The controlling expression of an if statement has to be an
essentially boolean type.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-06 10:25:24 -04:00
David Leach f2d8b4cc94 logging: log_backend_fs: Fix check for error on fs_sync() - coverity
Fixes #33791

Signed-off-by: David Leach <david.leach@nxp.com>
2021-04-01 04:52:10 -04:00
Andrzej Puzdrowski eb9454628e logging/log_backend_fs: support any directory
Added procedure which is able to create nested log director.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Andrzej Puzdrowski 6b18e6992d subsys/loggin/log_backend_fs: added recovery after file lost
Added recovery for case when log file was lost somehow.
Back-end will try to create new file if possible.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00
Mateusz Syc fe5f602606 susbys: logging: Added logging to flash backend
New backend is based on littleFS. After init, there is created new file
with continuous numeration. When max size of file is reached, system
creates another one. File size is limited by Kconfig option.
There is possibility to overwrite old files or drop new ones.
FS backend logging to file if the FS location is available.
Otherwise log messages are drooped.

User can also change the name of log files.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <Andrzej.Puzdrowski@nordicsemi.no>
2021-03-22 13:04:23 -04:00