build/log: add log types + NewSubLogger

This commit is contained in:
Conner Fromknecht
2018-09-20 03:17:15 -07:00
parent 4ea1a40a88
commit 9654a1c619
4 changed files with 138 additions and 0 deletions

11
build/log_nolog.go Normal file
View File

@@ -0,0 +1,11 @@
// +build nolog
package build
// LoggingType is a log type that writes no logs.
const LoggingType = LogTypeNone
// Write is a noop.
func (w *LogWriter) Write(b []byte) (int, error) {
return len(b), nil
}