mirror of
https://github.com/rclone/rclone
synced 2024-11-24 01:26:25 +01:00
d3dcc61154
- add context to log and fallthrough to error log level - test: use rclone random lib to generate random strings - calculate hash from vfs cache if file is uploading - add server started log with server url - remove md5 hasher
26 lines
487 B
Go
26 lines
487 B
Go
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 {
|
|
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...))
|
|
}
|
|
}
|