Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: tools/gn/input_file_manager.cc

Issue 23532076: GN: Add logging for the location of an invocation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iadd .cc file Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/location.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/input_file_manager.cc
diff --git a/tools/gn/input_file_manager.cc b/tools/gn/input_file_manager.cc
index 7a009e469d7e392424eac7e85afb6e9b88287171..1b55ea4fa39f2f44ca96176f0ff32dd9ee16fde2 100644
--- a/tools/gn/input_file_manager.cc
+++ b/tools/gn/input_file_manager.cc
@@ -194,8 +194,12 @@ bool InputFileManager::LoadFile(const LocationRange& origin,
Err* err) {
// Do all of this stuff outside the lock. We should not give out file
// pointers until the read is complete.
- if (g_scheduler->verbose_logging())
- g_scheduler->Log("Loading", name.value());
+ if (g_scheduler->verbose_logging()) {
+ std::string logmsg = name.value();
+ if (origin.begin().file())
+ logmsg += " (referenced from " + origin.begin().Describe(false) + ")";
+ g_scheduler->Log("Loading", logmsg);
+ }
// Read.
base::FilePath primary_path = build_settings->GetFullPath(name);
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/location.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698