Skip to content
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

Improve debug output #47

Merged
merged 7 commits into from
Jul 5, 2023

Conversation

landerweit-phytec
Copy link
Collaborator

Improve control over debug output with two new options:

--quiet: redirect all messages to the journal, except for error messages
--debug-domains: enable debug output only for the specified modules

Open points:

  • which messages should be debug or normal messages
  • add more debug output in pu-utils and pu-mount
  • disable compiler warnings for redefining G_LOG_DOMAIN

Supersedes #23

Copy link
Collaborator

@mschwan-phytec mschwan-phytec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash any fixup commits.

src/pu-config.c Outdated Show resolved Hide resolved
src/pu-main.c Outdated Show resolved Hide resolved
@landerweit-phytec landerweit-phytec marked this pull request as ready for review April 25, 2023 11:33
@landerweit-phytec landerweit-phytec force-pushed the wip-improve-debug branch 2 times, most recently from f22f3f7 to 5450077 Compare June 6, 2023 07:36
@landerweit-phytec
Copy link
Collaborator Author

I reworked the message output again. It uses a custom log writer function in src/pu-log.c now. Also, the journal is not used anymore.

@landerweit-phytec landerweit-phytec force-pushed the wip-improve-debug branch 2 times, most recently from 439f1be to 9c99351 Compare June 12, 2023 11:14
@landerweit-phytec landerweit-phytec force-pushed the wip-improve-debug branch 4 times, most recently from ac64209 to 5fc9898 Compare June 16, 2023 14:34
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-main.c Show resolved Hide resolved
doc/usage.rst Outdated Show resolved Hide resolved
@landerweit-phytec landerweit-phytec force-pushed the wip-improve-debug branch 2 times, most recently from f77d261 to b098eca Compare June 21, 2023 12:14
src/pu-log.c Outdated Show resolved Hide resolved
src/pu-log.c Outdated Show resolved Hide resolved
src/pu-log.c Outdated Show resolved Hide resolved
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-flash.c Outdated Show resolved Hide resolved
src/pu-log.c Outdated Show resolved Hide resolved
The new option quiet suppresses all messages except errors.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Different log domains for each source allow to enable and disable
logging individually.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
src/pu-main.c Outdated Show resolved Hide resolved
src/pu-log.c Outdated Show resolved Hide resolved
The new option allows to specify one ore more modules for which debug
output is printed.
Usage: '--debug-domains=config' or '--debug-domains=config,mount'

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Add debug output for pu-mount and pu-umount.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Move debug output for copying files, extracting archives and  writing
raw data from pu-emmc to pu-utils.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Add messages to indicate at what step of writing data partup currently is.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
@mschwan-phytec mschwan-phytec merged commit dec3d95 into phytec:main Jul 5, 2023
3 checks passed
@landerweit-phytec landerweit-phytec deleted the wip-improve-debug branch July 5, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants