* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
line number is now before function name
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.
In some cases, the system wasn't able to turn off
because the GUI service got stuck. The device
was still working in the background. The cause
was an empty queue in DrawCommandQueue which
hang the GUI worker.
The interface was modified and synchronization
mechanism was removed.
The thread no longer waits in dequeue().
Also changed the worker to close in the right
way the logger worker.
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.
Added tests and calls substate
bluetooth sm diagram created
All old bluetooth tests reviewed and updated
removed new - with queue it's not required
removed TODO
Co-authored-by: Bartosz Cichocki <sp2fet@gmail.com>
Now, both profiles can operate separately. Additonally, minor
fixes has been applied to allow calling via car audio system.
Some infotainment systems still don't work though.
Added atexit functionality. All global destructors and functions
registered with atexit() should be called at program exit.
It was possbile to reuse original newlib implementation with
MALLOC_PROVIDED flag set.
Made sure logger destructructor is called as last one.
Due to mudita OS legacy, it was not possible to simply fix dependencies
in global objectes and hence there are neither global objects
destructors nor functions registered with atexit() called when exit()
is called.
Possibly it will be changed later.
Stack plus minimum tests added
Updated to master
Removed useless or adressed TODOS
Constants name applied
Renamed searchModel to searchRequestModel
Review applied
We should remove legacy window names
Bell names fixes
ssp seems working
minor crash fixups
copy lacks patched
obsolete code removed
Devicei tests added for added code and cleanup
Added missing tests for new functions
Code cleaned up a bit - mostly moved to cpp
Using std::fstream for file I/O at every file access in FileContext.
Reworked file opening/closing to happen on each file chunk
read/write, so that a file isn’t left open in case of an error
or transfer cancelation.
Separeted RxID and TxID for reliable cancelation of stalled xfers.
Increasd io stream buffers:
- 64kB for big files with short lifetime scope
- 16kB for big files with long lifetime scope
- 1kB - dont changes default forr the rest
Added dumps rotation. Maximum count of the files set to 5.
The oldest dumps are removed if there're more than 5 of them.
Comparison is taken by the date.
Unified log and crash dumps rotators.
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>
Changed:
- Runtime disabled logs which didn't add value from ServiceDesktop
- Runtime disabled logs which didn't add value from SystemManager
- Added possibility to change runtime logging levels
- Integrated ServiceDesktop developer code a bit - it might be used
as virtual base with little to no modifications for other endpoints
which would result with less redundant code
- Removed not used files from old implementations.
- Renamed some classes to follow naming convention.
- Renamed methods to use consistent styling.
- Restructured code.
Added HSP ring sound on incoming call event while
there's bluetooth connection active and HSP is
selected as the current profile.
Possibility of pick up/decline the call using
BT device buttons added.
Slightly changed HSP initialization according
to the UML-s added.
Changed call hangup handler in service cellular.
- Dump logs to file every 10 sec.
- max file size is 50 MB
(after reaching it, no more logs will be logged),
- Add `LockGuard` with locking mechanism
supporting IRQ and use it in `Logger`.
- Fix minor style issues in `Logger`.
- Add `mount_user_lfs_partition.py` script for mounting LFS on Linux FS
in order to get `MuditaOS.log` file from `user` partition
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.