name-dyndns/log/log.go
2015-05-04 20:20:11 -04:00

16 lines
329 B
Go

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