From 5d864de6ce1883525931f6f5835e4bb27a74677a Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Mon, 10 Oct 2022 14:58:41 +0700 Subject: [PATCH] [Update] Logger --- action_create.go | 8 ++------ go.mod | 1 - go.sum | 4 ---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/action_create.go b/action_create.go index 2edfeba..bb327d3 100644 --- a/action_create.go +++ b/action_create.go @@ -2,8 +2,8 @@ package audit import ( "context" + "fmt" - "git.selly.red/Selly-Modules/logger" "git.selly.red/Selly-Modules/mongodb" ) @@ -47,10 +47,6 @@ func (s Service) Create(payload CreatePayload) { // Insert to db colName := getColName(payload.Target) if _, err := s.DB.Collection(colName).InsertOne(ctx, doc); err != nil { - logger.Error("audit - Create", logger.LogData{ - Source: "audit.action_create.Create", - Message: err.Error(), - Data: payload, - }) + fmt.Println("audit - Create", err.Error()) } } diff --git a/go.mod b/go.mod index fa3b8bf..c4e2d4b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module git.selly.red/Selly-Modules/audit go 1.16 require ( - git.selly.red/Selly-Modules/logger v0.0.3-0.20221010034051-82b204026f8c // indirect git.selly.red/Selly-Modules/mongodb v1.0.6-0.20221010033754-1d897a0f9ea2 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/golang/snappy v0.0.4 // indirect diff --git a/go.sum b/go.sum index 7092981..24e96be 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,3 @@ -git.selly.red/Selly-Modules/logger v0.0.2 h1:ZchJbOBN26K11qmfgCtkF2eO2h7ldIKGG5SbQzmgBEE= -git.selly.red/Selly-Modules/logger v0.0.2/go.mod h1:kvXfyQNzXgdHfbocMCtUssRXicVKdwJahAKLKMJD1uU= -git.selly.red/Selly-Modules/logger v0.0.3-0.20221010034051-82b204026f8c h1:eqGjWFibI3/7ovg9fGBx//E/I2HyydnkstphghcLiQI= -git.selly.red/Selly-Modules/logger v0.0.3-0.20221010034051-82b204026f8c/go.mod h1:q1q2tXmja+vOKo3IU7qZhRXaEBB5jETxHqUlYHsAUEQ= git.selly.red/Selly-Modules/mongodb v1.0.4 h1:zAtqmW+RLnNpAlB+bu2s7FE02D9AuptFjjx9KrbStRI= git.selly.red/Selly-Modules/mongodb v1.0.4/go.mod h1:OhqdqYqh8WqEEruz6U27Wu1kKoBLwIUQsc+56xl0Wcs= git.selly.red/Selly-Modules/mongodb v1.0.6-0.20221010033754-1d897a0f9ea2 h1:bePzcMN/j4V1fvz6UUrN01ey1tkE0w+m5Qj3LtoZs4E=