logging is now compatible with klog.

See https://git.kyleisom.net/lib/libklogger
This commit is contained in:
Kyle Isom
2016-04-01 15:08:55 -07:00
parent 419f23d655
commit d1452f54c0
8 changed files with 442 additions and 487 deletions

14
logging/console_logger.go Normal file
View File

@@ -0,0 +1,14 @@
package logging
import "os"
// Console is a Logger that writes to the console. It must be
// constructed with a call to NewConsole.
type Console struct {
*LogWriter
}
// NewConsole returns a new console logger.
func NewConsole() *Console {
return &Console{LogWriter: NewLogWriter(os.Stdout, os.Stderr)}
}