2017-08-12 23:51:48 +00:00
|
|
|
"""Bridgy App Engine config.
|
|
|
|
"""
|
2020-01-31 15:38:58 +00:00
|
|
|
# suppress these INFO logs:
|
2017-09-02 03:49:00 +00:00
|
|
|
# Sandbox prevented access to file "/usr/local/Caskroom/google-cloud-sdk"
|
|
|
|
# If it is a static file, check that `application_readable: true` is set in your app.yaml
|
|
|
|
import logging
|
|
|
|
|
|
|
|
class StubsFilter(logging.Filter):
|
|
|
|
def filter(self, record):
|
|
|
|
msg = record.getMessage()
|
|
|
|
if (msg.startswith('Sandbox prevented access to file') or
|
|
|
|
msg.startswith('If it is a static file, check that')):
|
|
|
|
return 0
|
|
|
|
return 1
|
|
|
|
|
|
|
|
logging.getLogger().addFilter(StubsFilter())
|