aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2017-08-09 18:25:28 -0700
committerJeff Gaston <jeffrygaston@google.com>2017-08-10 12:20:30 -0700
commitf1fd45e7848bd5a0be26ee61579d110637449930 (patch)
treea5fe80c254e534e0ce99c355f4a4ea0b69b66d7a /ui
parentc3f32070dc7ba229a6f883b12e4799995d9f9526 (diff)
downloadbuild_soong-f1fd45e7848bd5a0be26ee61579d110637449930.tar.gz
build_soong-f1fd45e7848bd5a0be26ee61579d110637449930.tar.bz2
build_soong-f1fd45e7848bd5a0be26ee61579d110637449930.zip
Revert "Revert "Cacheable, multithreaded finder.""
Bug: 62455338 Test: m -j This reverts commit d1abeb9d982b11fdf4047176d213acc8197c375f. Change-Id: I9f73031636157511b5f1c6ce8a205e9bc91669ff
Diffstat (limited to 'ui')
-rw-r--r--ui/logger/logger.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/logger/logger.go b/ui/logger/logger.go
index db7e82ad..7d9687be 100644
--- a/ui/logger/logger.go
+++ b/ui/logger/logger.go
@@ -145,13 +145,14 @@ func New(out io.Writer) *stdLogger {
// SetVerbose controls whether Verbose[f|ln] logs to stderr as well as the
// file-backed log.
-func (s *stdLogger) SetVerbose(v bool) {
+func (s *stdLogger) SetVerbose(v bool) *stdLogger {
s.verbose = v
+ return s
}
// SetOutput controls where the file-backed log will be saved. It will keep
// some number of backups of old log files.
-func (s *stdLogger) SetOutput(path string) {
+func (s *stdLogger) SetOutput(path string) *stdLogger {
if f, err := CreateFileWithRotation(path, 5); err == nil {
s.mutex.Lock()
defer s.mutex.Unlock()
@@ -164,6 +165,7 @@ func (s *stdLogger) SetOutput(path string) {
} else {
s.Fatal(err.Error())
}
+ return s
}
// Close disables logging to the file and closes the file handle.