]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm-remote/log/logger.go
sync: go fmt
[safcm/safcm.git] / cmd / safcm-remote / log / logger.go
index 8d88d8948b4e332ae72638058fa67b87ee2d4a3a..f358b75af7bad9cf35f47c4a1abd1a28c2311483 100644 (file)
@@ -24,17 +24,15 @@ import (
 )
 
 // LogFunc is a helper type to reduce typing.
-type LogFunc func(level safcm.LogLevel, format string, a ...interface{})
+type LogFunc func(level safcm.LogLevel, msg string)
 
 type Logger struct {
-       fun    LogFunc
-       prefix string
+       fun LogFunc
 }
 
-func NewLogger(prefix string, fun LogFunc) *Logger {
+func NewLogger(fun LogFunc) *Logger {
        return &Logger{
-               fun:    fun,
-               prefix: prefix,
+               fun: fun,
        }
 }
 
@@ -50,5 +48,5 @@ func (l *Logger) Debug2f(format string, a ...interface{}) {
 
 func (l *Logger) log(level safcm.LogLevel,
        format string, a ...interface{}) {
-       l.fun(level, "%s %s", l.prefix, fmt.Sprintf(format, a...))
+       l.fun(level, fmt.Sprintf(format, a...))
 }