logoutput

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageFieldName       = "message"
	TimestampFieldName     = "time"
	LevelFieldName         = "level"
	CallerFieldName        = "caller"
	FuncFieldName          = "func"
	WriteDurationFieldName = "writeDuration"
	StackTraceFieldName    = "errorStack"
	ErrorMsgFieldName      = "errorMsg"
	LogFatalExitCode       = 1
)

Variables

View Source
var JSONConsoleWrapper func(io.Writer) io.Writer

Functions

func GetCallerFileNameWithLine

func GetCallerFileNameWithLine(skipCallNumber, adjustLineNumber int) (fileNameAndLine string, funcName string)

func GetCallerInfo

func GetCallerInfo(skipCallNumber int) (fileName string, funcName string, line int)

func OpenLogBareOutput

func OpenLogBareOutput(output LogOutput, fmt logcommon.LogFormat, param string) (logcommon.BareOutput, error)

Types

type LogOutput

type LogOutput uint8
const (
	StdErrOutput LogOutput = iota
	SysLogOutput
	FileOutput
)

func (LogOutput) IsConsole

func (l LogOutput) IsConsole() bool

func (LogOutput) String

func (l LogOutput) String() string

Jump to

Keyboard shortcuts

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