mirror of
https://github.com/rclone/rclone.git
synced 2025-08-15 00:02:35 +02:00
serve s3: fixes before merge
- 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
This commit is contained in:
@ -12,15 +12,14 @@ type logger struct{}
|
||||
|
||||
// print log message
|
||||
func (l logger) Print(level gofakes3.LogLevel, v ...interface{}) {
|
||||
// fs.Infof(nil, fmt.Sprintln(v...))
|
||||
switch level {
|
||||
case gofakes3.LogErr:
|
||||
fs.Errorf(nil, fmt.Sprintln(v...))
|
||||
case gofakes3.LogWarn:
|
||||
fs.Infof(nil, fmt.Sprintln(v...))
|
||||
case gofakes3.LogInfo:
|
||||
fs.Debugf(nil, fmt.Sprintln(v...))
|
||||
default:
|
||||
panic("unknown level")
|
||||
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...))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user