aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils/log.cpp
Commit message (Collapse)AuthorAgeFilesLines
* host: test: Add UHD_UNITTEST_LOG_LEVEL overrideLane Kolbly2022-03-111-19/+35
|
* uhd: Replace boost::thread::id with std::thread::idMartin Braun2021-07-141-3/+3
| | | | | | | | The Boost version is identical to the std:: version (which is available since C++11) and thus is no longer needed. Because of implicit includes, this breaks compilation in other parts. Appropriate includes were added there also.
* utils: log: fix logging race conditionmattprost2020-04-141-1/+3
| | | | | | | It was possible that output to cout would become interleaved inside of the uhd log messages. Signed-off-by: mattprost <matt.prost@ni.com>
* log: Remove LOG statement from _get_log_level()Martin Braun2020-01-291-2/+1
| | | | | | _get_log_level() is an internal function that only gets called during setup, so the logger isn't ready yet. It thus now logs to stderr instead of the logger.
* utils: log: Name all threadsMartin Braun2020-01-291-5/+16
| | | | | | Logging creates two threads, one for regular logging, and one for fastpath logging. Now these threads are named using uhd::set_thread_name()
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-1/+1
| | | | | | | | | | | | | | | | | | | This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
* cmake: Add UHD_COMPONENT variablemichael-west2019-10-151-1/+1
| | | | | | | | Added cmake variable to set the component (currently UHD or MPM). so the banner printed by the log_resource would reference the correct component. Added accessor function and appropriate calls in log.cpp. Signed-off-by: michael-west <michael.west@ettus.com>
* log: Honour log levels on session initMartin Braun2019-10-101-0/+3
| | | | | | | | | | The first log message of UHD is always something like this: [INFO] [UHD] linux; GNU C++ version [...] However, it was being printed regardless of the requested log level. This will disable all initial log messages if the requested log level is greater than INFO.
* logging: On POSIX, don't use logging colors on non-ttyMarcus Müller2019-10-091-1/+6
|
* log: Change logging coloursMartin Braun2019-05-071-3/+3
| | | | | | TRACE: Remains purple, but that's now no longer bright ERROR: Is now bright red (was non-bold red before) FATAL: Is now red-on-yellow
* log: Fix ANSI colour codesMartin Braun2019-05-071-7/+9
| | | | | | The colour codes used for console logging were incorrectly defined. Some colours would simply not rendered this way (e.g., red), others had the boldness flag wrong.
* log: fix deadlock issue on Windows machinesAbdo-Gaber2019-04-111-3/+32
| | | | | | | In log.cpp, a deadlock can occur while popping elements from the log queue. If the queue is empty, the call does not timeout, and waits infinitely. Replacing pop_with_wait() with pop_with_timed_wait() solves this issue.
* log: formatting log.cppBrent Stapleton2019-04-111-168/+133
| | | | `clang-format -i --style=file host/lib/utils/log.cpp`
* Log: Handle Exceptions in DestructorVidush2018-06-061-1/+4
|
* log: Allow disabling of fastpath msgs at runtimeMartin Braun2018-04-261-13/+54
| | | | | | - Fixes an issue with compile time disabling as well - An UHD_LOG_FASTPATH_DISABLE=1 env var will make it that O/U/S/D won't be printed
* log: Add method for local generation of messages in log.cppMartin Braun2018-04-261-10/+18
|
* logging: Remove dead code from log.cppVidush2018-04-261-1/+0
|
* logging: Fix UHD_LOG_FILE cmake varMartin Braun2018-04-101-41/+54
| | | | | | | | | - Fixes: cmake -DUHD_LOG_FILE wasn't respected - Fixes: UHD_LOG_FILE and UHD_FILE_LOG_LEVEL had to both be set for either to take effect - Fixes: Use of unnecessary boost::make_shared<> - Also factored out setting up console- and file logger into their own locations in an attempt to improve readability
* uhd: Update license headersMartin Braun2018-02-191-1/+2
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* logging: Minor refactoring, skip empty log messagesMartin Braun2018-01-231-75/+102
| | | | | | | Empty log messages are now skipped for faster processing. The 'terminating' log message is now also empty (and thus skipped). Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* logging: Fix version print at top of every UHD sessionMartin Braun2018-01-181-17/+21
|
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* log: Removed timeout from logger, replaced with wait.Martin Braun2017-05-231-2/+20
| | | | | This works because there's also another trace message on termination of the logger.
* log: Moved print_system_info to log.cpp.trungnob2017-05-201-0/+18
| | | | | We want to display syteminfo when the log system get initialized. Also removes a static block.
* log: Split add_logger() out of the main logging headerMartin Braun2017-05-121-0/+1
| | | | | This way, C++11 features are not required to build with UHD headers included.
* log: Fixed compiler warningMartin Braun2017-05-031-1/+1
|
* log: Allow logging to blockMartin Braun2017-04-241-1/+2
| | | | | | | | This means it's very unlikely that logging messages get dropped, but the downside is that LOG macros can block for up to 250 ms. This is very unlikely though. Note that fastpath logging does not have this feature. It's always fast, and might drop messages.
* log: Moved fastpath logging to its own threadMartin Braun2017-04-241-0/+49
|
* log: Fixed various issuesMartin Braun2017-04-221-33/+62
| | | | | | - Made the task a regular thread - Moved verbosity operator into lib - Minor comments and indents and so on
* log: Added more comments and manual pageMartin Braun2017-04-201-5/+17
|
* log: Fix missing add_logger, fix clearing of queueMartin Braun2017-04-201-2/+25
|
* utils: implement Ettus Logging APIAndrej Rode2017-04-201-143/+182
| | | | | | | | - allows adding new loggers by using add_logger API call - existing loggers (console, file) can be disabled easily - number of logging sinks is not limited Signed-off-by: Martin Braun <martin.braun@ettus.com>
* utils: add coloring depending on loglevel to console outputAndrej Rode2017-04-071-1/+36
|
* utils: provide fallback to previous loglevel on reading environment/definesAndrej Rode2017-02-231-9/+13
|
* utils: introduce new logging API and remove msg APIAndrej Rode2017-02-201-71/+147
|
* log: remove MSVC 2010 Boost bug workaroundNicholas Corgan2016-03-111-13/+1
|
* uhd: Switched lock_guards header to locks.hppMartin Braun2014-09-301-1/+1
|
* uhd: Fixed logging bug (#476) -- UHD logging has unexplained effect on ↵michael-west2014-09-241-31/+28
| | | | | | | packet loss. - Removed logging from radio_ctrl_core_3000 - Changed logging facility to prevent type conversion when message is not logged
* log: replaced usage of deprecated boost::filesystem functionNicholas Corgan2014-05-121-3/+3
|
* uhd: used shared get_tmp_path for logging as wellJosh Blum2012-05-161-44/+3
| | | | Moved some of the log.cpp tmp paths smarts into paths as well
* uhd: tweaks to log and msg implementationJosh Blum2011-06-011-23/+19
| | | | | | The implementations now contain the string stream in each instance. This way there is not a global stringstream to lock access to. This resolves the issue of nested log calls locking condition.
* uhd: init log file lock ptr to nullJosh Blum2011-05-131-0/+4
|
* uhd: work on logging and message facility initializationJosh Blum2011-05-131-53/+59
|
* Make log locking work with picky boostJason Abele2011-05-051-4/+5
|
* uhd: various tweaks to log and msg, replaced a few remaining stdioJosh Blum2011-05-041-1/+1
|
* uhd: removed more iostream stuff from usrp* implementationsJosh Blum2011-05-041-1/+2
|
* uhd: replaced warning post with calls to UHD_MSG(warning)Josh Blum2011-05-041-1/+1
| | | | | The message api can support warnings, error, and status messages. The default handler is to stdio, but the user can change this.
* uhd: added interprocess file lock to the logger fileJosh Blum2011-05-041-3/+30
|
* uhd: tweaks for logger file entriesJosh Blum2011-05-041-6/+21
|
* usrp: replaced conditional dboard debug prints w/ UHD_LOGV(often)Josh Blum2011-05-041-6/+0
|