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

Add default logging handler to web.run_app (#3243) #3324

Merged
merged 5 commits into from
Nov 24, 2018

Conversation

0az
Copy link
Contributor

@0az 0az commented Oct 6, 2018

Fixes #3243.

What do these changes do?

Add a default logging handler to web.run_app.

Are there changes in behavior for the user?

If the Application.debug flag is set and the default logger aiohttp.access is used, access logs will now be output using a stderr StreamHandler if no handlers are attached. Furthermore, if the default logger has no log level set, the log level will be set to DEBUG.

Related issue number

This issue fixes #3243.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

@aio-libs-bot aio-libs-bot added good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ labels Oct 6, 2018
@codecov-io
Copy link

codecov-io commented Oct 6, 2018

Codecov Report

Merging #3324 into master will decrease coverage by 0.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3324      +/-   ##
=========================================
- Coverage   98.01%     98%   -0.02%     
=========================================
  Files          43      43              
  Lines        8025    8030       +5     
  Branches     1356    1359       +3     
=========================================
+ Hits         7866    7870       +4     
  Misses         66      66              
- Partials       93      94       +1
Impacted Files Coverage Δ
aiohttp/web.py 97.8% <80%> (-1.04%) ⬇️

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 929e197...e86dbbf. Read the comment docs.

@0az 0az force-pushed the fix-3243 branch 2 times, most recently from b11d4e5 to a746006 Compare October 6, 2018 05:52
aiohttp/log.py Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member

webknjaz commented Oct 6, 2018

@0az could you please come up with some sort of a regression test?

@0az 0az changed the title Add default logging handler to web.run_app (#3243) [WIP] Add default logging handler to web.run_app (#3243) Oct 30, 2018
@0az
Copy link
Contributor Author

0az commented Oct 30, 2018

Not sure what's going on with codecov.

In any case, now that there's a set of tests, I think this can be merged.

@asvetlov asvetlov mentioned this pull request Nov 8, 2018
@asvetlov asvetlov merged commit de84e78 into aio-libs:master Nov 24, 2018
@asvetlov
Copy link
Member

@0az thanks!

@lock
Copy link

lock bot commented Nov 24, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Nov 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 24, 2019
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable stdout logging in run_app by default
5 participants