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.