Add authentication and metrics

This commit is contained in:
Kevin Kandlbinder 2023-03-07 15:14:08 +01:00
parent 7667ea7b90
commit 6abea91d7c
Signed by: kevin
GPG key ID: 1460B586646E180D
16 changed files with 894 additions and 31 deletions

21
internal/logger/logger.go Normal file
View file

@ -0,0 +1,21 @@
package logger
import (
"github.com/spf13/viper"
"go.uber.org/zap"
)
var (
Logger *zap.Logger
Sugar *zap.SugaredLogger
)
func StartLogger() {
Logger, _ = zap.NewProduction()
if viper.GetBool("development") {
Logger, _ = zap.NewDevelopment()
}
Sugar = Logger.Sugar()
}