Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PeSme committed Jan 21, 2024
1 parent 2b6b8ed commit fc13434
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkg/trace/resolver.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2023 Outreach Corporation. All Rights Reserved.

// Description: This file contains
// Description: This file contains constants and tools for controlling trace.Start/EndCall logging

package trace

Expand All @@ -13,18 +13,19 @@ import (
type InfoLoggingResolved int32

const (
InfoLogging_Default InfoLoggingResolved = 0
InfoLogging_Enabled InfoLoggingResolved = 1
InfoLogging_Disabled InfoLoggingResolved = 2
InfoLoggingDefault InfoLoggingResolved = 0
InfoLoggingEnabled InfoLoggingResolved = 1
InfoLoggingDisabled InfoLoggingResolved = 2
)

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

// ResolvedLogging returns signals trace.EndCall whether to enable/disable info logging
func ResolvedLogging(logging InfoLoggingResolved) log.Marshaler {
if logging == InfoLogging_Default {
if logging == InfoLoggingDefault {
return nil
}
if logging == InfoLogging_Enabled {
if logging == InfoLoggingEnabled {
return WithInfoLoggingDisabled()
}
return WithInfoLoggingDisabled()
Expand Down

0 comments on commit fc13434

Please sign in to comment.