Skip to content

Commit

Permalink
dox fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Lindfalk committed May 20, 2022
1 parent 19dc81b commit fb8b4a4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ go get github.com/dentech-floss/[email protected]
package example

import (
"github.com/dentech-floss/metadata/pkg/metadata"
"github.com/dentech-floss/logging/pkg/logging"
"github.com/dentech-floss/revision/pkg/revision"
)

func main() {

metadata := metadata.NewMetadata()

logger := logging.NewLogger(
&logging.LoggerConfig{
OnGCP: true,
ServiceName: "mysuperduper-service",
OnGCP: metadata.OnGCP,
ServiceName: revision.ServiceName,
},
)
defer logger.Sync() // flushes buffer, if any
Expand All @@ -34,8 +39,8 @@ func main() {
package example

import (
"context"
"github.com/dentech-floss/logging/pkg/logging"

patient_gateway_service_v1 "go.buf.build/dentechse/go-grpc-gateway-openapiv2/dentechse/patient-api-gateway/api/patient/v1"
)

Expand All @@ -46,9 +51,9 @@ func (s *PatientGatewayServiceV1) FindAppointments(

// Ensure trace information + request is part of the log entries
logWithContext := s.logger.WithContext(
ctx,
logging.ProtoField("request", request),
)
ctx,
logging.ProtoField("request", request),
)

logWithContext.Info(
"Something something...",
Expand Down

0 comments on commit fb8b4a4

Please sign in to comment.