32 Commits (c47be649f4adbfba12d035ba156a0f6dd30a34cb)

Author SHA1 Message Date
faluco 485ec2edab Implement a new option to flush the file sink contents on every write. 3 years ago
faluco c7ddedcf72 Log the invalid format string to help grepping it in the logs. 3 years ago
faluco 9571109a69 Abort program execution if STOP_ON_WARNING is defined when formatting an invalid log entry. 3 years ago
faluco 8cde3f20e7 Catch exceptions thrown on invalid format strings in the log backend and print an error message to signal the issue. 3 years ago
faluco 8708043a5f - Add date to log timestamps.
- Print once per second the current timestamp into stdout, feature guarded by a config expert option.
3 years ago
David Rupprecht d990db66f6 Added syslog logger 3 years ago
faluco e20934583e Remove an unsafe assert in the log backend that could be triggered under very certain circumstances.
RFCI has detected this assert failing in the log_backend_test. I have not been able to reproduce this locally but my theory is the following one:
one of the unit tests does the following:

backend.start();
backend.stop();

the internal running_flag member could be set to true and then to false by the main thread before the worker thread calls do_work(). If this happens
the assert will be triggered, which is wrong and too conservative, so remove the assert.
3 years ago
faluco 6fb81c7619 - Add a mutex with priority inheritance for srslog internal structures.
- Replace shared_variable members in log_channel class in favor of atomics.
- Remove the small string optimization in srslog now that we dont allocate anymore.
- Trim some critical sections in srslog.
4 years ago
faluco aef18f9931 Implement a benchmark for measuring latency in the foreground threads when pushing log entries.
This benchmark runs with several threads to test contention.
4 years ago
faluco 1ccb62af3d Apply srsLTE formatting rules to srsLog. They were previously formatted with different rules when the project lived in the external rapo. 4 years ago
faluco a474a0f293 SRSLOG: Avoid calling unordered_map::emplace if element already exists since it will allocate even if the insertion is not going to take place. 4 years ago
Xavier Arteaga 7823bfc28c Fix append NR to loggers for NR components 4 years ago
faluco daad20c9d4 Disable copy and move operations for dyn_node_pool. 4 years ago
faluco a2f6e13138 Add a tag to the string memory pool in fmt to discriminate between pool vs heap allocated buffers. Heap allocated buffers are used as a fallback mechanism when the buffer runs out of space. 4 years ago
faluco 0465f6badd Implement a pool in FMT to avoid allocating heap memory when passing a char* to the backend, usually when formatting a %s argument.
Previously since a char* can have any length, this was managed by FMT by converting it into a std::string.
Now we store it into a configurable size node that can store a fixed size string, otherwise it falls back to std::string.
4 years ago
David Rupprecht b944528a4f Install srslog to system folder 4 years ago
faluco e2c7809abb - Introduce a new tracer scoped object that only records if the event duration exceeds the programmed threshold. 4 years ago
faluco 4b5e15cd70 - Fixed missing return statements in base_circular_buffer::try_push.
- Fixed array index calculation in base_circular_buffer::clear.
- Removed redundant explicit in srslog::backend_worker.
4 years ago
faluco e8395c7474 - Implement a pool to store dyn arg store objects in srslog to avoid allocations when passing arguments to the backend.
- Use string views inside the log formatters to avoid allocations.
- Avoid a std::string when using fmt::vsprintf, instead favour fmt::vprintf.
4 years ago
Codebot 4523ee6087 rename srsLTE to srsRAN 4 years ago
faluco eb27efd867 Modify the policy of the buffered sink to flush its contents continuously instead of doing it once. 4 years ago
faluco e43f555fc0 - Provide a fast path for logging pre-formatted strings that are small and fit in 64 bytes without any allocations.
- Use this new feature in the tracer.
4 years ago
faluco 173dcdd421 - Import latest srslog version.
- Remove string allocs in some log lines in radio.cc.

Add new tracing buffer capcity options into srsenb and srsue.

Add missing file.
4 years ago
faluco 711438f756
Port enb specific classes to use srslog (#2155)
* - Started porting the enb PHY layer to use srslog loggers.
- Updated srslog to manage the none level.

* Finished porting enb phy layer including the NR part.

* Ported MAC, GTPU, PDCP, RLC and S1AP enb classes to use srslog.

* Use new stack logger.

* Ported the enb RRC clases to use srslog.

* Remove unused log macros.

* Replace loggers in sched, sched_carrier, sched_helpers.

* Replaced loggers in sched grid.

* Replaced loggers in sched harq.

* Replaced loggers in sched ue.

* Replaced loggers in sched ue ctrl.

* Replace loggers in sched ue ctrl TPC.

* Replaced loggers in sched subclasses.

* Replaced loggers in rrc_meascfg_test

* Configure loggers in rrc_mobility_test.

* Fix compilation errors left out after the rebase.

* - Implement a custom log sink that will serve as a test spy to intercept and count the number of error and warning log entries.
- Adapt the erab_test_setup and rrc_mobility tests to use this new class and make them pass again.

* - Remove trailing new lines introduced in the rebase.
- Ported the sched_ue_cell class to srslog.

* Remove unused log member.

* Ported mac tests to srslog.

* - Removed remaining trailing newlines from log entries.

* Fix compiler errors detected in CI.

* Fix another static variable without definition passed to log lines.

* Fixed a bug in srslog::flush that would never end when the backend queue is full.

* Fetch the RRC logger instead of injecting it in the constructor.
4 years ago
faluco f23fdf0639 Include missing files. 4 years ago
faluco 98a2c868b5 Update srslog to latest version. 4 years ago
Andre Puschmann 47c5f9e85b remove AGPL header from remaining cpp files
* also add commercial header to come CMake helpers
4 years ago
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 4 years ago
Andre Puschmann 5e7de0a95b cmake: install individual libraries (common, phy, etc)
this seems to be important for package maintainers
or people who use srslte components in other projects
thar require to link against static libs

so besides installing headers, the apps and the RF lib, we also
install all individual libraries

this fixes https://github.com/srsLTE/srsLTE/issues/500#
and https://github.com/softwareradiosystems/srsLTE/issues/1754
4 years ago
faluco 8376111419 - LGTM fixes. 4 years ago
faluco 51b27fc255
Import latest srslog version (#1796)
* - Import latest srslog version.
- Adjusted the nas_test to create logs correctly.
- Remove timestamp formatting now that is provided by srslog.
4 years ago
faluco efdff8ba4c
Import srslog into srsue (#1556)
- Import the srslog project into srslte.
- Ported srsue app to use the new logging framework.
- Implemented a wrapper that dispatches log entries to srslog.
- Renamed an existing log test to be more specific to avoid name clashes.
4 years ago