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

mosquitto: Set mosquitto.conf log_type based on logging level #1708

Merged
merged 19 commits into from
Feb 8, 2021

Conversation

b3nj1
Copy link
Contributor

@b3nj1 b3nj1 commented Dec 9, 2020

Hi @pvizeli ,
I have resubmitted #1703 after fixing my git mistakes and with your recommendation to use the system level logging.

I can't manage to change the configured logging level to test it. Do you know where/how I should change to something besides my current setting of 'info'? I've tried this and rebooted.

# configuration.yaml
logger:
  default: warn
  • Benjamin

@b3nj1
Copy link
Contributor Author

b3nj1 commented Dec 10, 2020

OK - I was able to test it and get a reduction in logging output with warning vs info.

It took me a while to figure out where the supervisor log level was (as opposed to the logger setting above in configuration.yaml), so adding some notes for future me or someone else looking around.

config $ ha supervisor options -l warning

@b3nj1
Copy link
Contributor Author

b3nj1 commented Dec 10, 2020

Hi @pvizeli ,

The auth_srv.sh was using unguarded echo logging on each connection. I updated my PR to change this to use bashio::log..

At present, the logging level defaults to "info" in bashio. Should the bashio initial log level be changed to pick up the supervisor level?

Thanks for any help,
Benjamin

@b3nj1
Copy link
Contributor Author

b3nj1 commented Dec 23, 2020

I've updated the PR to set the bashio logging level to match the supervisor level. I've been using this for a while without issue. Please let me know if there anything else I can do to make this PR ready for acceptance.

Thanks,
Benjamin

@Erriez
Copy link

Erriez commented Jan 4, 2021

@b3nj1 I was looking for an easy method to configure log_type all in mosquitto addon and found your PR. What is the easiest way to configure log_type all with your method? Thanks!

mosquitto/data/auth_srv.sh Outdated Show resolved Hide resolved
Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

Please update the changelog + bump the version and rebase it current master to run the CI on it

@b3nj1
Copy link
Contributor Author

b3nj1 commented Jan 25, 2021

I think I've done there requested bumps, but I might have screwed up the git steps (again :( ).

@pvizeli pvizeli merged commit d291f56 into home-assistant:master Feb 8, 2021
wernerhp pushed a commit to wernerhp/addons that referenced this pull request Feb 26, 2021
…ssistant#1708)

* config option for mosquitto log_type

* change log_type to be based on LOGGING

* remove extra whitespace

* use bashio::log.<level> for logging

* set run.sh and auth_srv.sh bashio logging level to match supervisor level

* lint fixes

* Update mosquitto/data/auth_srv.sh

Co-authored-by: Pascal Vizeli <[email protected]>

* HomeMatic: s6-overlay & tempio (home-assistant#1713)

* HomeMatic: s6-overlay & tempio

* Use tempio

* fix line end

* Fix dev version

* Fix bugs

* S6-overlay cleanup for HM & deCONZ (home-assistant#1717)

* HomeMatic: take container down on ReGaHss (home-assistant#1719)

* HomeMatic: Fix ingress (home-assistant#1720)

* HomeMatic: Fix ingress

* Fix count

* Fix template HM

* set run.sh and auth_srv.sh bashio logging level to match supervisor level

* lint fixes

* Update mosquitto/data/auth_srv.sh

Co-authored-by: Pascal Vizeli <[email protected]>

Co-authored-by: Pascal Vizeli <[email protected]>
Co-authored-by: Pascal Vizeli <[email protected]>
scolby33 pushed a commit to scolby33/addons that referenced this pull request Apr 4, 2023
…ing level (home-assistant#1708)

* config option for mosquitto log_type

* change log_type to be based on LOGGING

* remove extra whitespace

* use bashio::log.<level> for logging

* set run.sh and auth_srv.sh bashio logging level to match supervisor level

* lint fixes

* Update mosquitto/data/auth_srv.sh

Co-authored-by: Pascal Vizeli <[email protected]>

* HomeMatic: s6-overlay & tempio (home-assistant#1713)

* HomeMatic: s6-overlay & tempio

* Use tempio

* fix line end

* Fix dev version

* Fix bugs

* S6-overlay cleanup for HM & deCONZ (home-assistant#1717)

* HomeMatic: take container down on ReGaHss (home-assistant#1719)

* HomeMatic: Fix ingress (home-assistant#1720)

* HomeMatic: Fix ingress

* Fix count

* Fix template HM

* set run.sh and auth_srv.sh bashio logging level to match supervisor level

* lint fixes

* Update mosquitto/data/auth_srv.sh

Co-authored-by: Pascal Vizeli <[email protected]>

Co-authored-by: Pascal Vizeli <[email protected]>
Co-authored-by: Pascal Vizeli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants