File: console_logger.go

package info (click to toggle)
golang-github-kisom-goutils 0.0~git20161101.0.858c9cb-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 396 kB
  • sloc: makefile: 6
file content (14 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)}
}