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 control via CLI flag #866

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

erkinalp
Copy link

This PR adds a --verbosity flag to control logging levels globally, addressing issue #501.

Key changes:

  • Add --verbosity CLI flag with standard log level choices (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  • Add set_default_levels() function for dynamic level control
  • Add unit tests for verbosity control
  • Maintain backward compatibility with environment variables

The implementation allows users to control logging verbosity through:

  1. CLI flag: --verbosity [DEBUG|INFO|WARNING|ERROR|CRITICAL]
  2. Environment variables (existing): SWE_AGENT_LOG_STREAM_LEVEL, SWE_AGENT_LOG_FILE_LEVEL

Example usage:

# Set verbosity via CLI
sweagent run --verbosity DEBUG ...

# Set verbosity via environment (existing method)
export SWE_AGENT_LOG_STREAM_LEVEL=DEBUG
sweagent run ...

Link to Devin run: https://app.devin.ai/sessions/e14f693390ed47ba87d12698d5834d08

Fixes #501

devin-ai-integration bot and others added 3 commits December 20, 2024 09:11
This change adds a --verbosity flag to control logging levels globally.
Key changes:
- Add --verbosity CLI flag with standard log level choices
- Add set_default_levels() function for dynamic level control
- Add unit tests for verbosity control
- Maintain backward compatibility with env vars

Fixes SWE-agent#501

Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
Co-Authored-By: Erkin Alp Güney <erkinalp9035@gmail.com>
@erkinalp erkinalp closed this Dec 23, 2024
@erkinalp erkinalp deleted the devin/1734685879-add-verbosity-control branch December 23, 2024 18:30
@erkinalp erkinalp restored the devin/1734685879-add-verbosity-control branch December 23, 2024 18:33
@erkinalp erkinalp reopened this Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set verbosity of all logs with CL flag
1 participant