8000 Add thread information to logging by Spacetown · Pull Request #752 · gcovr/gcovr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add thread information to logging #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

Spacetown
Copy link
Member

Without threads the logging isn't changed. If more than one thread is used the message looks like this:

(DEBUG) - Thread-2 - Parsing coverage data for file /Users/Shared/Informatik/GitHub/gcovr/gcovr/tests/nested/subdir/A/file2.cpp
(DEBUG) - MainThread - Gathered coveraged data for 8 files

Closes #751

@Spacetown Spacetown added this to the Upcoming release milestone Mar 15, 2023
@Spacetown Spacetown merged commit fe91271 into gcovr:master Mar 16, 2023
@Spacetown Spacetown deleted the add_thread_information_to_logging branch March 16, 2023 20:13
frankwiles pushed a commit to revsys/gcovr that referenced this pull request Apr 4, 2023
* Add thread to log messages if multithreading is active.
Spacetown added a commit that referenced this pull request Aug 14, 2023
* Add --template-dir option to README

* Add to other file

* Add --template-dir argument

* Fix typo

* Finish --template-dir option

Pass options down to `templates()` everywhere it's called.
Change which jinja2 loader is used depending on existence of the
argument.

* Add useful docs for --template-dir

* Add thread information to logging (#752)

* Add thread to log messages if multithreading is active.

* Fix nested report if only one directory in root is present. (#750)

- Add comments and to collapse code and remove not needed endless loop.
The loop is always executed only once because because the first statement in the block isn't changed in a second iteration.
- Collapse also the data in the root.
- Use `pop(key)` instead of copying the whole dict ignoring the value.
- Fix evaluating of common path in nested HTML report.
The root_filter wasn't applied to the root directory in HTML report since there is no trailing path separator at the end. Now the directories always have a trailing path separator which is removed in the report generation. To get the common path part the root directory is excluded.
- Replace recursive generation of directory stats with a loop.
- Use a object instead of a dataclass and remove the recursive function and the tests for it.
- Improve detection of root directory.

* Add interface to writer modules (#755)

* Move formats to sub directories.
* Move function print_reports from __main__.py to writer/__init__.py.
* Write global logger uppercase because it's constant.
* Move gcov data handling to a own format handler
* Use constants for the exit code.
* Add prefix of format to each option.
* Only forward the options of the format and some generic options to the handler.
* Add one config key for each long option.

* Add --html-template-dir argument

* Finish --html-template-dir option

Pass options down to `templates()` everywhere it's called.
Change which jinja2 loader is used depending on existence of the
argument.

* Resolve merge issue and refactor

- Refactor based on suggestion

* Fix merge and refactor to new output layout

- Refactors code to use new `gcovr/formats/` layout
- Renames option to `--html-template-dir`
- Fixes merge artifacts I created on accident

* Add Frank Wiles to AUTHORS.txt

* Use Jinja2 ChoiceLoader

This allows the user to only have to override the certain templates
they wish to adjust and it will fall through to using the included
ones for any template names the user has not overriden in
`--html-template-dir`

* Update documentation to reflect ChoiceLoader

* Fix docs typo

* Fix README typo

* Remove merge mistake

* Update CHANGELOG

* Add --html-template-dir test

* Change what we're testing on --html-template-dir

* Fix test again

* Improve template-dir option docs

* Improve template-dir docs

* Add tests to ensure templates are overridden

- Ensure the two we override are indeed overidden
- Ensure we fall through to default templates if not

* Remove debugging print

* Add template test

* Forgot to save Makefile change

* Update failing HTML/CSS comparison

* Update gcovr/tests/test_html_generator.py

Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>

* Fix linting issue

* Remove test that behaves oddly in CI

* Fix CI run

* Update documentation

* Update reference data

* Fix documentation error

---------

Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>
@Spacetown Spacetown removed this from the Upcoming release milestone Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

verbose output vs multithreading
1 participant
0