logging

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigType   = "logging" + cpi.OCM_CONFIG_TYPE_SUFFIX
	ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	runtime.ObjectVersionedType `json:",inline"`

	// ContextType described the context type to apply the setting.
	// If not set, the settings will be applied to any logging context provider,
	// which are not derived contexts.
	ContextType string        `json:"contextType,omitempty"`
	Settings    logcfg.Config `json:"settings"`

	// ExtraId is used for the context type "default", "ocm" or "global" to be able
	// to reapply the same config again using a different
	// identity given by the settings hash + the id.
	ExtraId string `json:"extraId,omitempty"`
}

Config describes logging settings for a dedicated context type.

func New

func New(ctxtype string, deflvl int) *Config

New creates a logging config specification.

func NewWithConfig added in v0.3.0

func NewWithConfig(ctxtype string, cfg *logcfg.Config) *Config

NewWithConfig creates a logging config specification from a logging config object.

func (*Config) AddRuleSpec

func (c *Config) AddRuleSpec(r logcfg.Rule) error

func (*Config) ApplyTo

func (c *Config) ApplyTo(ctx cpi.Context, target interface{}) error

func (*Config) GetType

func (c *Config) GetType() string

Jump to

Keyboard shortcuts

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