mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Migrate from iodine to probe
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/pkg/iodine"
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
"github.com/minio/minio/pkg/utils/log"
|
||||
)
|
||||
|
||||
@@ -99,12 +99,12 @@ func fileLogger(filename string) (chan<- []byte, error) {
|
||||
ch := make(chan []byte)
|
||||
file, err := os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
|
||||
if err != nil {
|
||||
return nil, iodine.New(err, map[string]string{"logfile": filename})
|
||||
return nil, probe.New(err)
|
||||
}
|
||||
go func() {
|
||||
for message := range ch {
|
||||
if _, err := io.Copy(file, bytes.NewBuffer(message)); err != nil {
|
||||
log.Errorln(iodine.New(err, nil))
|
||||
log.Errorln(probe.New(err))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user