File: std.go

package info (click to toggle)
golang-github-spiffe-go-spiffe 2.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,116 kB
  • sloc: makefile: 157
file content (24 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package logger

import "log"

// Std is a logger that uses the Go standard log library.
var Std Logger = stdLogger{}

type stdLogger struct{}

func (stdLogger) Debugf(format string, args ...interface{}) {
	log.Printf("[DEBUG] "+format+"\n", args...)
}

func (stdLogger) Infof(format string, args ...interface{}) {
	log.Printf("[INFO] "+format+"\n", args...)
}

func (stdLogger) Warnf(format string, args ...interface{}) {
	log.Printf("[WARN] "+format+"\n", args...)
}

func (stdLogger) Errorf(format string, args ...interface{}) {
	log.Printf("[ERROR] "+format+"\n", args...)
}