mssqlbulkloader/logger.go

22 lines
240 B
Go
Raw Normal View History

2023-04-03 19:12:30 +05:00
package main
import (
"io"
"log"
"os"
)
type Logger struct {
silent bool
}
var logger *log.Logger
func initLogger(silent bool) {
if silent {
logger = log.New(io.Discard, "", 0)
} else {
logger = log.New(os.Stderr, "", 0)
}
}