mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 00:51:34 +02:00
fs: refactor base log method name for improved consistency
This commit is contained in:
committed by
Nick Craig-Wood
parent
dfc2c98bbf
commit
4a54cc134f
@ -60,8 +60,8 @@ var LogPrintPid = false
|
||||
// InstallJSONLogger is a hook that --use-json-log calls
|
||||
var InstallJSONLogger = func(logLevel LogLevel) {}
|
||||
|
||||
// LogPrint sends the text to the logger of level
|
||||
var LogPrint = func(level LogLevel, text string) {
|
||||
// LogOutput sends the text to the logger of level
|
||||
var LogOutput = func(level LogLevel, text string) {
|
||||
text = fmt.Sprintf("%-6s: %s", level, text)
|
||||
if LogPrintPid {
|
||||
text = fmt.Sprintf("[%d] %s", os.Getpid(), text)
|
||||
@ -143,7 +143,7 @@ func LogPrintf(level LogLevel, o interface{}, text string, args ...interface{})
|
||||
if o != nil {
|
||||
out = fmt.Sprintf("%v: %s", o, out)
|
||||
}
|
||||
LogPrint(level, out)
|
||||
LogOutput(level, out)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user