CML Message updates for C++20
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the CML message handler and its existing tests, then read how it currently formats and colors messages. Implementing the proposed changes involves source location, formatting, wrapping, Trick and non-Trick timestamps, and possibly file logging; the file logging request is open-ended. Done means the message output follows the agreed format and the handler’s tests cover the supported behavior.
Written by the indexing model from the issue text.
Description
After we step up to C++20, add a few improvements to our message handler:
- Use
std::source_locationto get the source location information. Users only need to worry about the actual message content. Passstd::source_location::current()as final defaulted argument. - Update the message format to be more visually distinct between messages.
- Add option to log to a text file too?
Proposed new message format:
[WARNING] at sim-time 123.45 : /path/to/model/source.cc:100 SomeModel::update()
This is a warning message generated from the source code. It will be colored according
to severity like it currently is. The [TAG] will be as well. If the user specifies their own line
breaks, those will be respected. Otherwise, their message will be automatically wrapped to
100 (user-configurable?) lines. In a non-Trick environment, print the actual date and time
instead of sim time. The messages will be auto-indented to separate back-to-back messages
more clearly.
- Dominant language
- C++
- Stars
- 18
- Forks
- 9
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nasa/cml
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
infrastructure
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Allow table interpolation model to accept moved vectorsMay be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
bug priority:p2
Difficulty 1/5 Under an hour Newbie friendliness 82/100
xifan2333/fcitx5-vinput#738 ·
Maintainers usually reply within 1 day
-
good first issue hardware-report help wanted
Difficulty 1/5 Under an hour Newbie friendliness 66/100
-
need triaging
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
launcher: settings are never saved on macOS — QSettings SystemScope points to /Library/PreferencesOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day