logging

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logging provides a logger that logs fx events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFxLoggingOption added in v0.60.0

func DefaultFxLoggingOption() fx.Option

DefaultFxLoggingOption creates an fx.Option to configure the Fx logger, either to do nothing (the default) or to log to the console (when TRACE_FX is set at `1`).

func EnableFxLoggingOnDebug added in v0.60.0

func EnableFxLoggingOnDebug[T Logger]() fx.Option

EnableFxLoggingOnDebug enables the logs for FX events when log_level is debug. This function requires that DefaultFxLoggingOption is part of the fx Options. This function uses generics to avoid depending on the logger component. When TRACE_FX is set to 0, it will disable the logging.

Types

type Logger

type Logger interface {
	Debug(v ...interface{})
}

Logger is a logger that logs fx events.

Jump to

Keyboard shortcuts

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