mirror of
https://github.com/rclone/rclone.git
synced 2024-12-03 22:12:02 +01:00
c87097109b
This also updates the interface which has gained a ctx parameter in the mean time.
26 lines
485 B
Go
26 lines
485 B
Go
package s3
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/rclone/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 {
|
|
default:
|
|
fallthrough
|
|
case gofakes3.LogErr:
|
|
fs.Errorf("serve s3", fmt.Sprintln(v...))
|
|
case gofakes3.LogWarn:
|
|
fs.Infof("serve s3", fmt.Sprintln(v...))
|
|
case gofakes3.LogInfo:
|
|
fs.Debugf("serve s3", fmt.Sprintln(v...))
|
|
}
|
|
}
|