diff --git a/.github/workflows/builder-publish.yaml b/.github/workflows/builder-publish.yaml index 0731c00..5c52525 100644 --- a/.github/workflows/builder-publish.yaml +++ b/.github/workflows/builder-publish.yaml @@ -97,7 +97,7 @@ jobs: - name: Build ${{ matrix.addon }} add-on if: steps.check.outputs.build_arch == 'true' - uses: home-assistant/builder@2024.01.0 + uses: home-assistant/builder@2024.03.5 with: args: | ${{ env.BUILD_ARGS }} \ diff --git a/.github/workflows/builder.yaml b/.github/workflows/builder.yaml index 3b13305..a99e3d0 100644 --- a/.github/workflows/builder.yaml +++ b/.github/workflows/builder.yaml @@ -97,7 +97,7 @@ jobs: - name: Build ${{ matrix.addon }} add-on if: steps.check.outputs.build_arch == 'true' - uses: home-assistant/builder@2024.01.0 + uses: home-assistant/builder@2024.03.5 with: args: | ${{ env.BUILD_ARGS }} \ diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b94b631..3abc96a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -31,6 +31,6 @@ jobs: uses: actions/checkout@v3.3.0 - name: 🚀 Run Home Assistant Add-on Lint - uses: frenck/action-addon-linter@v2.11 + uses: frenck/action-addon-linter@main with: path: "./${{ matrix.path }}" diff --git a/awnet/CHANGELOG.md b/awnet/CHANGELOG.md index 4b9a595..098f486 100644 --- a/awnet/CHANGELOG.md +++ b/awnet/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [1.1.1] - 2024-03-30 + +### Changed + +- Update logging format to include file name and line number for easier troubleshooting; update format for readability. +- Update logger for WSGI to use the built-in Python logger (and not log out to stderr, thanks @jruby411!). + ## [1.1.0] - 2024-01-27 ### Changed diff --git a/awnet/config.yaml b/awnet/config.yaml index 51115b5..c4f3a09 100644 --- a/awnet/config.yaml +++ b/awnet/config.yaml @@ -1,5 +1,5 @@ name: AWNET to HASS -version: 1.1.0 +version: 1.1.1 slug: awnet_to_hass description: Addon to capture local Ambient Weather data in Home Assistant arch: diff --git a/awnet/rootfs/awnet.py b/awnet/rootfs/awnet.py index b6ef5cb..0da9a49 100644 --- a/awnet/rootfs/awnet.py +++ b/awnet/rootfs/awnet.py @@ -142,11 +142,15 @@ def parse_request(self): _LOGGER.debug("new raw_requestline: %s", self.raw_requestline) return super().parse_request() + # Use the built-in log handler rather than outputting to stderr + def log_message(self, format, *args): + _LOGGER.info(format, *args) + if __name__ == "__main__": from wsgiref.simple_server import make_server logging.basicConfig(stream = sys.stdout, - format = '%(asctime)s %(levelname)8s : %(message)s', + format = '[%(asctime)s] [%(levelname)-8s] %(message)s (%(filename)s:%(lineno)d)', level = sys.argv[1]) # probably shouldn't run on port 80 but that's what I specified in the ambient weather console