Skip to content

Logging 500 errors#35

Open
AmanuelAaron wants to merge 14 commits intomasterfrom
error-log
Open

Logging 500 errors#35
AmanuelAaron wants to merge 14 commits intomasterfrom
error-log

Conversation

@AmanuelAaron
Copy link
Copy Markdown
Contributor

PR is dependant on #33

@AmanuelAaron AmanuelAaron requested a review from oremj July 10, 2019 17:46
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 10, 2019

Codecov Report

Merging #35 into master will decrease coverage by 1.57%.
The diff coverage is 27.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
- Coverage    89.3%   87.73%   -1.58%     
==========================================
  Files           7        7              
  Lines         823      848      +25     
==========================================
+ Hits          735      744       +9     
- Misses         88      104      +16
Impacted Files Coverage Δ
tests/test_api.py 97.64% <100%> (+0.07%) ⬆️
nazgul/api.py 75.27% <12.9%> (-4.41%) ⬇️

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 eace744...764bda3. Read the comment docs.

@AmanuelAaron AmanuelAaron mentioned this pull request Jul 10, 2019
13 tasks
Copy link
Copy Markdown
Contributor

@oremj oremj left a comment

Choose a reason for hiding this comment

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

Can we look into logging these in JSON format?

Copy link
Copy Markdown
Contributor

@oremj oremj left a comment

Choose a reason for hiding this comment

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

I think we should either do it like this: https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging or you could look in to a package like https://github.com/hynek/structlog

@AmanuelAaron AmanuelAaron requested a review from jbuck August 2, 2019 14:28
Copy link
Copy Markdown
Contributor

@jbuck jbuck left a comment

Choose a reason for hiding this comment

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

Rather than rolling your own structured logger, I think it'd make more sense to use an existing one like the built-in Flask logger or structlog

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.

4 participants