logimpl

package module
v0.57.1 Latest Latest
Warning

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

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

Documentation

Overview

Package logimpl implements a component to handle logging internal to the agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTemporaryLoggerWithoutInit

func NewTemporaryLoggerWithoutInit() logdef.Component

NewTemporaryLoggerWithoutInit returns a logger component instance. It assumes the logger has already been initialized beforehand.

This function should be used when all these conditions are true: - You write or update code which uses a lot of logging. - You want the code to be components ready. - logger.Component cannot be injected.

It should not be used when: - You add few logging functions. - When the instance of logger.Component is reachable in less than 5 stack frames. - It doesn't make the migration to log.Component easier.

Types

type Provides

type Provides struct {
	Comp logdef.Component
}

Provides defines the output of the log component

func NewComponent

func NewComponent(deps Requires) (Provides, error)

NewComponent creates a log.Component using the provided config

type Requires

type Requires struct {
	Lc     compdef.Lifecycle
	Params logdef.Params
	Config config.Component
}

Requires declares the input types to the logger component constructor

Jump to

Keyboard shortcuts

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