Use GLOG logging prefixes#40491
Closed
malfet wants to merge 1 commit intopytorch:masterfrom
Closed
Conversation
df8d0ac to
6654f9e
Compare
💊 CI failures summary and remediationsAs of commit 315aa95 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
🚧 1 fixed upstream failure:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
6654f9e to
0214e20
Compare
0214e20 to
8657088
Compare
Also, to further mimic glog, add GLOG_ prefix before severity levels Play with LOG() LOG_IF() macors to use namespaced and prefixed sevirity levels
8657088 to
315aa95
Compare
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
ezyang
approved these changes
Jun 24, 2020
Contributor
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: PyTorch should stop polluting global namespace with symbols such as `ERROR` `WARNING` and `INFO`. Since `logging_is_not_google_glog.h` is a C++ header, define severity levels in namespace and add `GLOG_` prefix to match an unshortened glog severity levels. Change `LOG` and `LOG_IF` macros to use prefix + namespaced severity levels. Closes pytorch#40083 Pull Request resolved: pytorch#40491 Test Plan: CI Reviewed By: ezyang Differential Revision: D22210925 Pulled By: malfet fbshipit-source-id: 0ec1181a53baa8bca2f526f245e398582304aeab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyTorch should stop polluting global namespace with symbols such as
ERRORWARNINGandINFO.Since
logging_is_not_google_glog.his a C++ header, define severity levels in namespace and addGLOG_prefix to match an unshortened glog severity levels.Change
LOGandLOG_IFmacros to use prefix + namespaced severity levels.Closes #40083