From 1e0526a5997dbd20c4119d0dd5154e79ce6f2b2c Mon Sep 17 00:00:00 2001 From: restitux Date: Tue, 31 Jan 2023 18:47:44 -0700 Subject: [PATCH] Add logging to pipeline create graphql mutation --- admin_api/admin_api.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/admin_api/admin_api.go b/admin_api/admin_api.go index f09b9c3..e025480 100644 --- a/admin_api/admin_api.go +++ b/admin_api/admin_api.go @@ -8,8 +8,11 @@ import ( "github.com/google/uuid" "github.com/graphql-go/graphql" "github.com/graphql-go/handler" + "github.com/op/go-logging" ) +var log = logging.MustGetLogger("cursorius-server") + func createSchema(db database.Database) (graphql.Schema, error) { webhookType := graphql.NewObject(graphql.ObjectConfig{ Name: "Webhook", @@ -159,6 +162,10 @@ func createSchema(db database.Database) (graphql.Schema, error) { if err != nil { return nil, err } + + log.Infof("Created pipeline with id: %v, name: %v, url: %v, and poll interval: %v", + pipeline.Id, pipeline.Name, pipeline.Url, pipeline.PollInterval) + return pipeline, nil }, },