~f4814n/frost

ref: abcd6e72b355822384a3244234ae055345acab60 frost/cmd/frost/logger.go -rw-r--r-- 838 bytes
abcd6e72Fabian Geiselhart Bump matrix version 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main

import (
	"go.uber.org/zap"
	"git.sr.ht/~f4814n/matrix"
)

type MatrixLogger struct {
	*zap.SugaredLogger
}

func (l MatrixLogger) Named(name string) matrix.Logger {
	return MatrixLogger{l.SugaredLogger.Named(name)}
}

func (l MatrixLogger) Debug(msg string, keysAndValues ...interface{}) {
	l.SugaredLogger.Debugw(msg, keysAndValues...)
}

func (l MatrixLogger) Info(msg string, keysAndValues ...interface{}) {
	l.SugaredLogger.Infow(msg, keysAndValues...)
}

func (l MatrixLogger) Warn(msg string, keysAndValues ...interface{}) {
	l.SugaredLogger.Warnw(msg, keysAndValues...)
}

func (l MatrixLogger) Error(msg string, keysAndValues ...interface{}) {
	l.SugaredLogger.Errorw(msg, keysAndValues...)
}

func (l MatrixLogger) Fatal(msg string, keysAndValues ...interface{}) {
	l.SugaredLogger.Fatalw(msg, keysAndValues...)
}