capture

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedCapturer

type CachedCapturer struct {
	*DefaultCapturer
	// contains filtered or unexported fields
}

CachedCapturer is a capturer that caches type information.

func NewCachedCapturer

func NewCachedCapturer() *CachedCapturer

NewCachedCapturer creates a new cached capturer.

func (*CachedCapturer) TryCapture

func (d *CachedCapturer) TryCapture(value any, propertyFactory core.LogEventPropertyFactory) (*core.LogEventProperty, bool)

TryCapture attempts to capture a value using cached type information.

type DefaultCapturer

type DefaultCapturer struct {
	// contains filtered or unexported fields
}

DefaultCapturer is the default implementation of core.Capturer.

func NewCapturer

func NewCapturer(maxDepth, maxStringLength, maxCollectionCount int) *DefaultCapturer

NewCapturer creates a capturer with custom limits.

func NewDefaultCapturer

func NewDefaultCapturer() *DefaultCapturer

NewDefaultCapturer creates a new capturer with default settings.

func (*DefaultCapturer) RegisterScalarType

func (d *DefaultCapturer) RegisterScalarType(t reflect.Type)

RegisterScalarType registers a type that should be treated as a scalar.

func (*DefaultCapturer) TryCapture

func (d *DefaultCapturer) TryCapture(value any, propertyFactory core.LogEventPropertyFactory) (prop *core.LogEventProperty, ok bool)

TryCapture attempts to capture a value into a log-friendly representation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL