Skip to content

Commit

Permalink
Fix doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Jun 25, 2024
1 parent ab7b1d9 commit 6b570c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sdk/log/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ type MinSeverityProcessor struct {
}

// NewMinSeverityProcessor returns a [MinSeverityProcessor] that decorates the
// processor such that only [logsdk.Record]s with a [log.Severity] greater than or
// equal to minimum will be processed.
// processor such that only [logsdk.Record] with a [log.Severity] greater than or
// equal to minimum is processed.
func NewMinSeverityProcessor(minimum log.Severity, processor logsdk.Processor) *MinSeverityProcessor {
return &MinSeverityProcessor{
Processor: processor,
minimum: minimum,
}
}

// OnEmit passes the context and record to the underlying [logsdk.Processor] s
// decorates if the [log.Severity] of record is greater than or equal to the
// minimum severity s is configured at.
// OnEmit passes the context and record to the underlying [logsdk.Processor]
// if the [log.Severity] of record is greater than or equal to the
// minimum severity is configured at.
func (s *MinSeverityProcessor) OnEmit(ctx context.Context, record logsdk.Record) error {
if !s.enabled(record) {
return nil
}
return s.Processor.OnEmit(ctx, record)
}

// Enabled returns true the [log.Severity] of record is greater than or equal
// to the minimum severity s is configured at. It will return false if the
// Enabled returns true if the [log.Severity] of record is greater than or equal
// to the minimum severity is configured at. It will return false if the
// severity is less than the minimum.
//
// If the record severity is unset, this will return true.
Expand Down

0 comments on commit 6b570c4

Please sign in to comment.