diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36fca6b..9732c6a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.10, 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pylint @@ -32,11 +32,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.10, 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pytest @@ -44,7 +44,7 @@ jobs: - name: Test with pytest run: pytest -v --doctest-modules --cov=./ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true @@ -52,11 +52,11 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install twine run: pip install twine wheel - name: Build package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 676c8cb..7f78966 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.10, 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pylint @@ -32,11 +32,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.10, 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pytest @@ -44,6 +44,6 @@ jobs: - name: Test with pytest run: pytest -v --doctest-modules --cov=./ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true diff --git a/QLog/azure_system_logger.py b/QLog/azure_system_logger.py index 711ab9c..4bd6d19 100644 --- a/QLog/azure_system_logger.py +++ b/QLog/azure_system_logger.py @@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO): self.log_level = log_level if self.log_level is LogLevel.INFO: logging.getLogger().setLevel(logging.INFO) - if self.log_level is LogLevel.WARNING: + elif self.log_level is LogLevel.WARNING: logging.getLogger().setLevel(logging.WARNING) - if self.log_level is LogLevel.ERROR: + elif self.log_level is LogLevel.ERROR: logging.getLogger().setLevel(logging.ERROR) else: logging.getLogger().setLevel(logging.DEBUG) diff --git a/QLog/system_logger.py b/QLog/system_logger.py index 8d81d85..12445b2 100644 --- a/QLog/system_logger.py +++ b/QLog/system_logger.py @@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO): self.log_level = log_level if self.log_level is LogLevel.INFO: logging.getLogger().setLevel(logging.INFO) - if self.log_level is LogLevel.WARNING: + elif self.log_level is LogLevel.WARNING: logging.getLogger().setLevel(logging.WARNING) - if self.log_level is LogLevel.ERROR: + elif self.log_level is LogLevel.ERROR: logging.getLogger().setLevel(logging.ERROR) else: logging.getLogger().setLevel(logging.DEBUG)