change to use logging instead of print to stdout

This commit is contained in:
2023-04-03 12:00:01 +10:00
parent f2ac6097d6
commit 5cc67501d3
11 changed files with 88 additions and 87 deletions

View File

@@ -2,6 +2,7 @@ package token
import (
"fmt"
"log"
"os"
"strconv"
"strings"
@@ -15,7 +16,7 @@ func GenerateToken(user_id uint) (string, error) {
token_lifespan, err := strconv.Atoi(os.Getenv("TOKEN_HOUR_LIFESPAN"))
if err != nil {
fmt.Printf("GenerateToken Error getting env value TOKEN_HOUR_LIFESPAN\n")
log.Printf("GenerateToken Error getting env value TOKEN_HOUR_LIFESPAN\n")
return "", err
}