telebit/logging/loggers.go
Henry Camacho 894bd997a9 Restructured code, using module use, created logging package as a helper
- altered code to support a client bound interface
- altered code to support an admin bound interface
- added configurations and defaults.
- removed timeout function at the end of main.
- the final go routine was converted to a foreground routine.
2017-02-05 21:19:04 -06:00

27 lines
443 B
Go

package logging
import (
"io"
"log"
)
// Logging structure used for setup of logging
var (
logflags int
loginfo *log.Logger
logfatal *log.Logger
)
// Init configure logging structures
func Init(writer io.Writer, flags int) {
loginfo = log.New(writer, "INFO: ", flags)
logfatal = log.New(writer, "INFO: ", flags)
}
// Get loggingers
func Get() (linfo *log.Logger, lfatal *log.Logger) {
linfo = loginfo
lfatal = logfatal
return
}