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

Add verbosity option (incremental) and use log instead of print #155

Closed
wants to merge 5 commits into from

Conversation

Guts
Copy link
Collaborator

@Guts Guts commented Sep 21, 2022

Context

Recently, we faced an issue with the log length using qgis-plugin-ci on GitLab CI/CD:

Job's log exceeded limit of 4194304 bytes.
Job execution will continue but no more output will be collected.

See this job: https://gitlab.com/Oslandia/qgis/ign-geotuileur/-/jobs/3056269109

But I've been thinking for a long time that we should reduce the amount of information returned to the terminal or let the end-user pick.

Changes

STILL IN PROGRESS

  • add a verbosity option -v with an incremental count

    # by default, log nothing except print statement = WARNING
    qgis-plugin-ci package latest
    # -v = INFO
    qgis-plugin-ci -v package latest
    # -vv = DEBUG
    qgis-plugin-ci -vv package latest
  • add a setting into the setup.cfg to customize log format

  • remove option alias -v from the version option to avoid conflict

  • improve some exception handling: mainly add Trace: {exc} and use f-string instead of format as recommended

@Guts Guts added the enhancement New feature or request label Sep 21, 2022
@Guts Guts self-assigned this Sep 21, 2022
Copy link
Collaborator

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

Nice move !

@3nids
Copy link
Member

3nids commented Sep 22, 2022

niiiiice!!!

@Guts
Copy link
Collaborator Author

Guts commented Sep 22, 2022

Thanks for your comments. I've created a clean branch and the corresponding PR: #156 . I close here.

@Guts Guts closed this Sep 22, 2022
@Guts Guts added duplicate This issue or pull request already exists and removed enhancement New feature or request labels Sep 22, 2022
@Guts Guts deleted the log-instead-print branch September 22, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants