fs: refactor base log method name for improved consistency

This commit is contained in:
albertony
2024-06-07 12:42:52 +02:00
committed by Nick Craig-Wood
parent dfc2c98bbf
commit 4a54cc134f
5 changed files with 13 additions and 13 deletions

View File

@ -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)
}
}