7 "github.com/zyedidia/micro/v2/internal/util"
10 // NullWriter simply sends writes into the void
11 type NullWriter struct{}
14 func (NullWriter) Write(data []byte) (n int, err error) {
18 // InitLog sets up the debug log system for micro if it has been enabled by compile-time variables
20 if util.Debug == "ON" {
21 f, err := os.OpenFile("log.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
23 log.Fatalf("error opening file: %v", err)
27 log.Println("Micro started")
29 log.SetOutput(NullWriter{})