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

Unified Diff: lib/naclports/package.py

Issue 839083003: Add initial support for color output in the build system (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 11 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
Index: lib/naclports/package.py
diff --git a/lib/naclports/package.py b/lib/naclports/package.py
index 5eb21b0fbeeb403c3c22c7e24179f1db10bc5822..8f0bb4d7d2518d1d061db5c1d65aae9332a61325 100644
--- a/lib/naclports/package.py
+++ b/lib/naclports/package.py
@@ -78,6 +78,12 @@ class Package(object):
def InfoString(self):
return "'%s' [%s]" % (self.NAME, self.config)
+ def LogStatus(self, message, suffix=''):
+ util.LogHeading(message, " '%s' [%s] %s" % (
+ util.Color(self.NAME, 'yellow'),
+ util.Color(self.config, 'blue'),
+ suffix))
+
def CheckDeps(self, valid_packages):
for package in self.DEPENDS:
if package not in valid_packages:
@@ -113,7 +119,7 @@ class InstalledPackage(Package):
self.BUILD_CONFIG == 'debug')
def Uninstall(self):
- Log("Uninstalling %s" % self.InfoString())
+ self.LogStatus('Uninstalling')
self.DoUninstall()
def Files(self):

Powered by Google App Engine
This is Rietveld 408576698