name-dyndns/log/log.go

17 lines
334 B
Go
Raw Normal View History

2015-05-04 20:20:11 -04:00
// Package log provides a basic global logger for name-dyndns.
2015-05-04 20:03:17 -04:00
package log
import (
"io"
"log"
)
2015-05-04 20:20:11 -04:00
// Global logger.
2015-05-04 20:03:17 -04:00
var Logger *log.Logger
// Init intializes the logger with a specific io.Writer.
2015-05-04 20:20:11 -04:00
// This function is generally called near startup.
2015-05-04 20:03:17 -04:00
func Init(writer io.Writer) {
Logger = log.New(writer, "", log.Ldate|log.Ltime)
}