Repository navigation
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… NUL-termination Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…Address failure Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jmw182 <3036948+jmw182@users.noreply.github.com>
commit was revised to fix copilot's whitespace (CRLF) mangling
Allow console output stream to be configured (defaults to stderr) Allow colorized output to be disabled, including automatically when not outputting to a terminal Add RTMA_LevelName and RTMA_LevelFromName functions Fix log file name format
**Logger changes** (in `RTMA_Logger.cpp` and `RTMA_Logger.h`) - **Locking:** every getter and setter now takes the mutex, and `GetLogName()` no longer deadlocks when `LogMessage` calls it. - **File sink:** the file stays open, and a byte counter drives rotation at 3 MiB with three backups. I flush after every line. If the file can't be opened, written, or reopened after rotating, the sink turns itself off and prints one warning on the console stream. - **RTMA send:** the payload is built under the lock but sent after releasing it. A per-thread guard stops a log call made during a send from sending again. A thrown send turns the RTMA sink off. - **Dangling module:** `RTMA_Module`'s destructor calls a new `Detach()`, so a `Child()` logger that outlives the module no longer touches freed memory. It still logs to console and file. - **Truncation:** only the RTMA payload is cut at 1023 characters. Console and file get the full message. - **Time:** `MDF_RTMA_LOG.time` is now epoch seconds, taken once per call and shared with the console and file timestamps. - **Windows color:** in AUTO mode the logger turns on virtual terminal processing once for the console stream, and skips color if that fails. **Docs:** `RTMA.h` now says `RTMA_Module` and `SendMessage` are not thread-safe, and that logging to RTMA from several threads needs `Logger().SetRTMAEnabled(false)`. **Tests:** `public_api_test.cpp` gained four cases: - a child logger outliving its module; - rotation over 11 MB, leaving `.1` to `.3` but no `.4`; - a 2000-character message arriving whole with no escape codes; - a short multi-threaded logging run. `CMakeLists.txt` links `Threads::Threads` into the test.
Add client logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RTMA v4 update
Fully compatible with pyrtma v4
Changes include:
Breaking Changes: