mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 00:15:11 +01:00
fix (log): non-constant format string in call to fmt.Printf
This commit is contained in:
parent
43f2843088
commit
f412c467b3
1 changed files with 5 additions and 5 deletions
|
|
@ -37,7 +37,7 @@ func (l *log) Info(format string, v ...interface{}) {
|
|||
message = fmt.Sprintf(message+format+"\n", v...)
|
||||
|
||||
logfile.WriteString(message)
|
||||
fmt.Printf(strings.Replace(message, "%", "%%", -1))
|
||||
fmt.Print(strings.Replace(message, "%", "%%", -1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ func (l *log) Warning(format string, v ...interface{}) {
|
|||
message = fmt.Sprintf(message+format+"\n", v...)
|
||||
|
||||
logfile.WriteString(message)
|
||||
fmt.Printf(strings.Replace(message, "%", "%%", -1))
|
||||
fmt.Print(strings.Replace(message, "%", "%%", -1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ func (l *log) Error(format string, v ...interface{}) {
|
|||
message = fmt.Sprintf(message+format+"\n", v...)
|
||||
|
||||
logfile.WriteString(message)
|
||||
fmt.Printf(strings.Replace(message, "%", "%%", -1))
|
||||
fmt.Print(strings.Replace(message, "%", "%%", -1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ func (l *log) Debug(format string, v ...interface{}) {
|
|||
message = fmt.Sprintf(message+format+"\n", v...)
|
||||
|
||||
logfile.WriteString(message)
|
||||
fmt.Printf(strings.Replace(message, "%", "%%", -1))
|
||||
fmt.Print(strings.Replace(message, "%", "%%", -1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ func (l *log) Stdout(format string, v ...interface{}) {
|
|||
message = fmt.Sprintf(message+format+"\n", v...)
|
||||
|
||||
logfile.WriteString(message)
|
||||
fmt.Printf(strings.Replace(message, "%", "%%", -1))
|
||||
fmt.Print(strings.Replace(message, "%", "%%", -1))
|
||||
}
|
||||
|
||||
func (l *log) now() string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue