logger

package
v1.52.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGLEVEL_ENV_VAR             = "ECS_LOGLEVEL"
	LOGLEVEL_ON_INSTANCE_ENV_VAR = "ECS_LOGLEVEL_ON_INSTANCE"
	LOGFILE_ENV_VAR              = "ECS_LOGFILE"
	LOG_DRIVER_ENV_VAR           = "ECS_LOG_DRIVER"
	LOG_ROLLOVER_TYPE_ENV_VAR    = "ECS_LOG_ROLLOVER_TYPE"
	LOG_OUTPUT_FORMAT_ENV_VAR    = "ECS_LOG_OUTPUT_FORMAT"
	LOG_MAX_FILE_SIZE_ENV_VAR    = "ECS_LOG_MAX_FILE_SIZE_MB"
	LOG_MAX_ROLL_COUNT_ENV_VAR   = "ECS_LOG_MAX_ROLL_COUNT"

	DEFAULT_LOGLEVEL                         = "info"
	DEFAULT_LOGLEVEL_WHEN_DRIVER_SET         = "off"
	DEFAULT_ROLLOVER_TYPE                    = "date"
	DEFAULT_OUTPUT_FORMAT                    = logFmt
	DEFAULT_MAX_FILE_SIZE            float64 = 10
	DEFAULT_MAX_ROLL_COUNT           int     = 24
)

Variables

View Source
var Config *logConfig

Functions

func Critical added in v1.50.1

func Critical(message string, fields ...Fields)

func Debug added in v1.50.1

func Debug(message string, fields ...Fields)

func Error added in v1.50.1

func Error(message string, fields ...Fields)

func GetLevel added in v1.14.5

func GetLevel() string

GetLevel gets the log level

func Info added in v1.50.1

func Info(message string, fields ...Fields)

func InitSeelog added in v1.47.0

func InitSeelog()

func SetLevel

func SetLevel(driverLogLevel, instanceLogLevel string)

SetLevel sets the log levels for logging

func Trace added in v1.50.1

func Trace(message string, fields ...Fields)

func Warn added in v1.50.1

func Warn(message string, fields ...Fields)

Types

type Fields added in v1.50.1

type Fields map[string]interface{}

func (Fields) Merge added in v1.50.1

func (f Fields) Merge(f2 Fields)

type StructuredLogger added in v1.50.1

type StructuredLogger interface {
	Trace(message string, fields ...Fields)
	Debug(message string, fields ...Fields)
	Info(message string, fields ...Fields)
	Warn(message string, fields ...Fields)
	Error(message string, fields ...Fields)
	Critical(message string, fields ...Fields)
}

Directories

Path Synopsis
mocks
Package mock_audit is a generated GoMock package.
Package mock_audit is a generated GoMock package.
Package mock_seelog is a generated GoMock package.
Package mock_seelog is a generated GoMock package.

Jump to

Keyboard shortcuts

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