logging

package
v0.0.0-...-1414968 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogInfo checks if the log level is INFO
	LogInfo string = "INFO"
	// LogError checks if the log level is ERROR
	LogError string = "ERROR"
	// LogWarning checks if the log level is WARNING
	LogWarning string = "WARNING"
)

Variables

This section is empty.

Functions

func InitRootLoger

func InitRootLoger()

InitRootLoger initialize root logger

func SetLogProps

func SetLogProps() map[string]string

SetLogProps creates a map of the log properties

Types

type Logger

type Logger interface {
	logrus.FieldLogger
	LoggerWith(logrus.Fields) Logger
}

Logger defines the interface for logging used by gophoton-core internally

func GetLogger

func GetLogger() Logger

GetLogger returns the logger

func LogFor

func LogFor() Logger

LogFor retrieves a logger for the context

type LoggerIdentity

type LoggerIdentity struct {
	RequestID string
	UserID    string
	SessionID string
}

LoggerIdentity stores context for logger

Jump to

Keyboard shortcuts

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