feature: verify tokens

This commit is contained in:
2024-11-17 22:28:29 +05:30
parent 26a00c9f7c
commit 9d40c9d7ec
57 changed files with 4188 additions and 276 deletions

View File

@@ -1,6 +1,7 @@
package logger
import (
"context"
"fmt"
"log/slog"
"os"
@@ -16,6 +17,12 @@ func Warn(msg string, args ...any) {
slog.Warn(fmt.Sprintf(msg, a...), b...)
}
func Incident(ctx context.Context, name, msg string, args ...any) {
a, b := getArgs(args)
slog.Warn(fmt.Sprintf(msg, a...), b...)
// TODO: save incident for alert purpose
}
func Error(err error, args ...any) {
a, b := getArgs(args)
slog.Error(fmt.Sprintf(err.Error(), a...), b...)