appenders

package
v0.0.0-...-274ce65 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Console

func Console() *consoleAppender

func Fluentd

func Fluentd(config fluent.Config) *fluentdAppender

func RollingFile

func RollingFile(filename string, directoryPath string, actualFileName string, append bool, dateRotation bool, reuseableFile bool, MaxBackupIndex int, customBackupFolder string, customFileNameGenerator func() string) *rollingFileAppender

func SafeFluentd

func SafeFluentd(config fluent.Config) (*fluentdAppender, error)

Types

type Appender

type Appender interface {
	Write(level levels.LogLevel, message string, args ...interface{})
	Layout() layout.Layout
	SetLayout(layout.Layout)
}

func Multiple

func Multiple(layout layout.Layout, appenders ...Appender) Appender

type LogDataEntry

type LogDataEntry struct {
	Timestamp string `json:"timestamp"`
	LogLevel  string `json:"level"`
	Message   string `json:"msg"`
}

type LogPayload

type LogPayload struct {
	LogLevel  string    `json:"logLevel"`
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
}

LogPayload - to shipped to url

Jump to

Keyboard shortcuts

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