Skip to content

Fix PROCRASTINATE_VERBOSE vs PROCRASTINATE_VERBOSITY inconsistency#1475

Closed
medihack wants to merge 3 commits into
procrastinate-org:mainfrom
medihack:claude/fix-bug-011CUvmNiXC4fK74kPTduxpg
Closed

Fix PROCRASTINATE_VERBOSE vs PROCRASTINATE_VERBOSITY inconsistency#1475
medihack wants to merge 3 commits into
procrastinate-org:mainfrom
medihack:claude/fix-bug-011CUvmNiXC4fK74kPTduxpg

Conversation

@medihack
Copy link
Copy Markdown
Member

@medihack medihack commented Nov 8, 2025

Fixes #1405

The CLI code was using PROCRASTINATE_VERBOSE as the environment variable, while the documentation incorrectly specified PROCRASTINATE_VERBOSITY. Additionally, the documentation claimed to support 3 log levels (warning, info, debug), but the code only supports 2 levels (info at 0, debug at 1+).

Changes:

  • Fixed documentation to use PROCRASTINATE_VERBOSE (matching the code)
  • Added new --log-level option (mutually exclusive with -v) that allows explicit control over all log levels: debug, info, warning, error, critical
  • Added PROCRASTINATE_LOG_LEVEL environment variable support
  • Updated documentation to reflect actual behavior and document new options
  • Updated help text to clearly show verbosity levels: 0=info, 1+=debug
  • Added comprehensive tests to verify:
    • PROCRASTINATE_VERBOSE environment variable works correctly
    • Command line flags override (not add to) environment variables
    • --log-level option works with all log levels
    • --log-level and -v are mutually exclusive
    • PROCRASTINATE_LOG_LEVEL environment variable works correctly

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

PR label(s):

Fixes procrastinate-org#1405

The CLI code was using PROCRASTINATE_VERBOSE as the environment variable,
while the documentation incorrectly specified PROCRASTINATE_VERBOSITY.
Additionally, the documentation claimed to support 3 log levels (warning,
info, debug), but the code only supports 2 levels (info at 0, debug at 1+).

Changes:
- Fixed documentation to use PROCRASTINATE_VERBOSE (matching the code)
- Command line flags (-v, -vv) now properly override environment variables
  instead of adding to them
- Added new --log-level option (mutually exclusive with -v) that allows
  explicit control over all log levels: debug, info, warning, error, critical
- Added PROCRASTINATE_LOG_LEVEL environment variable support
- Updated documentation to reflect actual behavior and document new options
- Updated help text to clearly show verbosity levels: 0=info, 1+=debug
- Added comprehensive tests to verify:
  * PROCRASTINATE_VERBOSE environment variable works correctly
  * Command line flags override (not add to) environment variables
  * --log-level option works with all log levels
  * --log-level and -v are mutually exclusive
  * PROCRASTINATE_LOG_LEVEL environment variable works correctly

All existing tests pass, and new tests confirm all functionality works as expected.
@medihack medihack requested a review from a team as a code owner November 8, 2025 18:58
@github-actions github-actions Bot added the PR type: bugfix 🕵️ Contains bug fix label Nov 8, 2025
@medihack medihack marked this pull request as draft November 8, 2025 18:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 8, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  procrastinate
  cli.py
Project Total  

This report was generated by python-coverage-comment-action

Verifies that when configure_logging() is called with no arguments
(no verbosity or log_level specified), it defaults to logging.INFO level.
@medihack
Copy link
Copy Markdown
Member Author

Closed in favor of #1501

@medihack medihack closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR type: bugfix 🕵️ Contains bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PROCRASTINATE_VERBOSE vs. PROCRASTINATE_VERBOSITY

2 participants