File: console_logger.go

package info (click to toggle)
golang-github-kisom-goutils 0.0~git20161101.0.858c9cb-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 384 kB
  • ctags: 331
  • sloc: makefile: 6
file content (14 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (3)
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)}
}