~f4814n/frost

1eee8169fcf6bda919ba018c6742f7b2d5268f15 — Fabian Geiselhart 6 months ago cbd5032
platform: Colorful logs on linux
1 files changed, 4 insertions(+), 1 deletions(-)

M platform/platform_linux.go
M platform/platform_linux.go => platform/platform_linux.go +4 -1
@@ 11,6 11,7 @@ import (
	backend "git.sr.ht/~f4814n/matrix/backend/sqlite"
	"git.sr.ht/~f4814n/matrix/util/cache"
	"go.uber.org/zap"
	"go.uber.org/zap/zapcore"
)

type platformLinux struct {


@@ 52,7 53,9 @@ func (p platformLinux) Cache() cache.Cache {
}

func (p platformLinux) Logger() *zap.Logger {
	logger, err := zap.NewDevelopment()
	config := zap.NewDevelopmentConfig()
	config.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
	logger, err := config.Build()
	if err != nil {
		panic(err.Error())
	}