Skip to content

Commit

Permalink
feat: allow controlling of StartCall info logging via LD
Browse files Browse the repository at this point in the history
  • Loading branch information
PeSme committed Dec 21, 2023
1 parent ea4c470 commit 0ce1fb3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions pkg/trace/resolver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2023 Outreach Corporation. All Rights Reserved.

// Description: This file contains

package trace

import (
"context"

"github.com/getoutreach/gobox/pkg/log"
)

type InfoLoggingResolved int32

const (
InfoLogging_Default InfoLoggingResolved = 0
InfoLogging_Enabled InfoLoggingResolved = 1
InfoLogging_Disabled InfoLoggingResolved = 2
)

type InfoLoggingResolver = func(ctx context.Context, operation string) InfoLoggingResolved

func ResolvedLogging(logging InfoLoggingResolved) log.Marshaler {
if logging == InfoLogging_Default {
return nil
}
if logging == InfoLogging_Enabled {
return WithInfoLoggingDisabled()
}
return WithInfoLoggingDisabled()
}

0 comments on commit 0ce1fb3

Please sign in to comment.