2022-09-21 15:09:50 +00:00
|
|
|
package s3
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/Mikubill/gofakes3"
|
|
|
|
"github.com/rclone/rclone/fs"
|
|
|
|
)
|
|
|
|
|
|
|
|
// logger output formatted message
|
|
|
|
type logger struct{}
|
|
|
|
|
|
|
|
// print log message
|
|
|
|
func (l logger) Print(level gofakes3.LogLevel, v ...interface{}) {
|
|
|
|
switch level {
|
2023-09-12 10:50:13 +00:00
|
|
|
default:
|
|
|
|
fallthrough
|
2022-09-21 15:09:50 +00:00
|
|
|
case gofakes3.LogErr:
|
2023-09-12 10:50:13 +00:00
|
|
|
fs.Errorf("serve s3", fmt.Sprintln(v...))
|
2022-09-21 15:09:50 +00:00
|
|
|
case gofakes3.LogWarn:
|
2023-09-12 10:50:13 +00:00
|
|
|
fs.Infof("serve s3", fmt.Sprintln(v...))
|
2022-09-21 15:09:50 +00:00
|
|
|
case gofakes3.LogInfo:
|
2023-09-12 10:50:13 +00:00
|
|
|
fs.Debugf("serve s3", fmt.Sprintln(v...))
|
2022-09-21 15:09:50 +00:00
|
|
|
}
|
|
|
|
}
|