megadumper

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogDestination

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

LogDestination is a struct that holds the configuration for a log destination. target: the target of the log destination (e.g., file path, rest API URL) writer: the writer to use for the log destination (e.g., to a dir, to rest API) formatter: the formatter to use for the log destination (e.g., JSON, TXT) logger: the logger used to print status to the terminal

func NewLogDestinations added in v2.3.0

func NewLogDestinations(
	logger *slog.Logger,
	logTarget string,
	format config.LogFormat,
) ([]LogDestination, error)

NewLogDestinationConfig creates a new log destination configuration object to select and store: logger: the logger used to print status to the terminal logTarget: the target of the log destination as a comma-delimited string (e.g., file path, rest API URL) format: the format of the log destination (e.g., JSON, TXT)

func (*LogDestination) String added in v2.2.0

func (ld *LogDestination) String() string

func (*LogDestination) Write added in v2.3.0

func (ld *LogDestination) Write(identifier string, logDumpContainer *schema.LogDumpContainer) (int, error)

Write writes a log dump container object to it's log destination. The formatter is responsible for converting the log dump container the correct format (json, text, etc) before writing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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