logging

package
v0.0.0-...-7c37063 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Log is an instance of the global logrus.Logger

Functions

func InitLogger

func InitLogger() *logrus.Logger

InitLogger initializes the global logger

Types

type CustomCloudwatch

type CustomCloudwatch struct {
	Hostname string
}

CustomCloudwatch adds hostname and app name

func NewCloudwatchFormatter

func NewCloudwatchFormatter(cfg *config.Config) *CustomCloudwatch

NewCloudwatchFormatter creates a new logrus formatter for cloudwatch

func (*CustomCloudwatch) Format

func (f *CustomCloudwatch) Format(entry *logrus.Entry) ([]byte, error)

Format is the log formatter for the entry

type Marshaler

type Marshaler interface {
	MarshalLog() map[string]interface{}
}

Marshaler is an interface any type can implement to change its output in our production logs.

Jump to

Keyboard shortcuts

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