cesium-ml / baselayer

Fully customizable (scientific, compute-intensive) web application template
http://cesium-ml.org/baselayer/
31 stars 18 forks source link

Do not log 404s from HEAD requests #201

Closed acrellin closed 3 years ago

acrellin commented 3 years ago

Closes https://github.com/skyportal/skyportal/issues/1164

pep8speaks commented 3 years ago

Hello @acrellin! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-03-04 21:28:22 UTC
stefanv commented 3 years ago

Is there a matching BL part to this?

acrellin commented 3 years ago

@stefanv this is a BL PR 😉

stefanv commented 3 years ago

:joy: OK, then I think it's not quite done—the majority of log entries go into the nginx logs?

acrellin commented 3 years ago

@stefanv :) I'm not sure what you mean

stefanv commented 3 years ago

I think the log entries are 404 HEAD entries made by nginx.

acrellin commented 3 years ago

@stefanv you mean messages like this? WARNING:tornado.access:400 PUT /api/comment/26238 (127.0.0.1) 14.89ms

stefanv commented 3 years ago

Yes, exactly.

acrellin commented 3 years ago

nginx logging level is currently at "info" -- should we bump that to "error" or at least "warn"?

stefanv commented 3 years ago

Probably; but I think we'll still run into the 404 HEADs that way.

acrellin commented 3 years ago

Nice, there's already a conditional logging check, so I've just updated that to not log 404s -- wanna take another look @stefanv ?

stefanv commented 3 years ago

It must log 404's, just not HEAD calls.

stefanv commented 3 years ago

:rocket: