src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

log.go (302B)


      1 package log
      2 
      3 import (
      4 	"log"
      5 	"os"
      6 )
      7 
      8 const flags = log.Ldate | log.Lmicroseconds | log.Lshortfile | log.LUTC
      9 
     10 type Logger struct {
     11 	Debug *log.Logger
     12 	Error *log.Logger
     13 }
     14 
     15 func New(f *os.File) *Logger {
     16 	return &Logger{
     17 		Debug: log.New(f, "DEBUG ", flags),
     18 		Error: log.New(f, "ERROR ", flags),
     19 	}
     20 }