-
Notifications
You must be signed in to change notification settings - Fork 565
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
MNT Removing the Fluentd setup and updating to default to GCP logging #4668
base: master
Are you sure you want to change the base?
Conversation
52a90e7
to
2e4a1c0
Compare
2e4a1c0
to
828c30f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great generally! just a minor nit + a question.
This is disabled for local development and if we are running in a app engine | ||
or kubernetes as these have their dedicated loggers, see | ||
configure_appengine() and configure_k8s().""" | ||
return bool(os.getenv('LOG_TO_GCP')) and not _is_local( | ||
) and not _is_running_on_app_engine() and not _is_running_on_k8s() | ||
return (bool(os.getenv("LOG_TO_GCP", "True")) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use single quotes for strings.
@@ -412,6 +389,8 @@ def cloud_label_filter(record): | |||
|
|||
handler.addFilter(cloud_label_filter) | |||
handler.setLevel(logging.INFO) | |||
formatter = JsonFormatter() | |||
handler.setFormatter(formatter) | |||
|
|||
logging.getLogger().addHandler(handler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we still have file logs in the bots directory this way? This can be a followup TODO if not.
File logs have been very useful in the past for debugging, when cloud logs somehow don't exist (e.g. network or some other issue).
No description provided.