mirror of
https://github.com/pushbits/server.git
synced 2025-05-31 17:56:33 +02:00
Use logrus for logging
This commit is contained in:
parent
c96baf40a5
commit
f839f248b9
19 changed files with 192 additions and 87 deletions
|
@ -2,10 +2,10 @@ package api
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/pushbits/server/internal/authentication"
|
||||
"github.com/pushbits/server/internal/log"
|
||||
"github.com/pushbits/server/internal/model"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
@ -90,7 +90,7 @@ func (h *UserHandler) updateUser(ctx *gin.Context, u *model.User, updateUser mod
|
|||
}
|
||||
}
|
||||
|
||||
log.Printf("Updating user %s.", u.Name)
|
||||
log.L.Printf("Updating user %s.", u.Name)
|
||||
|
||||
if updateUser.Name != nil {
|
||||
u.Name = *updateUser.Name
|
||||
|
@ -146,7 +146,7 @@ func (h *UserHandler) CreateUser(ctx *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
log.Printf("Creating user %s.", createUser.Name)
|
||||
log.L.Printf("Creating user %s.", createUser.Name)
|
||||
|
||||
user, err := h.DB.CreateUser(createUser)
|
||||
|
||||
|
@ -232,7 +232,7 @@ func (h *UserHandler) DeleteUser(ctx *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
log.Printf("Deleting user %s.", user.Name)
|
||||
log.L.Printf("Deleting user %s.", user.Name)
|
||||
|
||||
if err := h.deleteApplications(ctx, user); err != nil {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue