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

Fix invalid logging call #9

Merged
merged 1 commit into from
Dec 20, 2019
Merged

Fix invalid logging call #9

merged 1 commit into from
Dec 20, 2019

Conversation

flaeppe
Copy link
Contributor

@flaeppe flaeppe commented Dec 19, 2019

  • '.format' string syntax not supported by logging module

@codecov
Copy link

codecov bot commented Dec 19, 2019

Codecov Report

Merging #9 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #9   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     14           
  Lines         713    719    +6     
  Branches       55     55           
=====================================
+ Hits          713    719    +6
Impacted Files Coverage Δ
kapten/tool.py 100% <ø> (ø) ⬆️
tests/test_cli.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48eeb24...a572e5f. Read the comment docs.

@flaeppe
Copy link
Contributor Author

flaeppe commented Dec 19, 2019

Client startup raised following silently:

 --- Logging error ---
 Traceback (most recent call last):
   File "/usr/local/lib/python3.8/logging/__init__.py", line 1081, in emit
     msg = self.format(record)
   File "/usr/local/lib/python3.8/logging/__init__.py", line 925, in format
     return fmt.format(record)
   File "/usr/local/lib/python3.8/logging/__init__.py", line 664, in format
     record.message = record.getMessage()
   File "/usr/local/lib/python3.8/logging/__init__.py", line 369, in getMessage
     msg = msg % self.args
 TypeError: not all arguments converted during string formatting
 Call stack:
   File "/app/venv/bin/kapten", line 11, in <module>
     load_entry_point('kapten==1.3', 'console_scripts', 'kapten')()
   File "/app/venv/lib/python3.8/site-packages/kapten/cli.py", line 114, in command
     loop.run_until_complete(client.healthcheck())
   File "/usr/local/lib/python3.8/asyncio/base_events.py", line 595, in run_until_complete
     self.run_forever()
   File "/usr/local/lib/python3.8/asyncio/base_events.py", line 563, in run_forever
     self._run_once()
   File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1844, in _run_once
     handle._run()
   File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
     self._context.run(self._callback, *self._args)
   File "/app/venv/lib/python3.8/site-packages/kapten/tool.py", line 49, in healthcheck
     logger.info(
 Message: 'Tracking {} service{}'
 Arguments: (10, 's')

- '.format' string syntax not supported by logging module
@flaeppe flaeppe force-pushed the fix/healthcheck-log branch from aee55ef to a572e5f Compare December 20, 2019 08:41
@lundberg lundberg merged commit d486e32 into master Dec 20, 2019
@lundberg lundberg deleted the fix/healthcheck-log branch December 20, 2019 08:44
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.

2 participants