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
|
|
|
|
|
2015-05-07 21:28:41 -04:00
|
|
|
// 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)
|
|
|
|
}
|