Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Chars = [...]string{ log.DebugLevel: "D", log.InfoLevel: "I", log.WarnLevel: "W", log.ErrorLevel: "E", log.FatalLevel: "F", }
Chars mapping.
View Source
var Colors = [...]int{ log.DebugLevel: gray, log.InfoLevel: blue, log.WarnLevel: yellow, log.ErrorLevel: red, log.FatalLevel: red, }
Colors mapping.
View Source
var Strings = [...]string{ log.DebugLevel: "DEBUG", log.InfoLevel: "INFO", log.WarnLevel: "WARN", log.ErrorLevel: "ERROR", log.FatalLevel: "FATAL", }
Strings mapping.
Functions ¶
func FetchHeaders ¶
FetchHeaders extracts specified headers from request
func FetchUID ¶ added in v0.6.3
FetchUID safely extracts uid from `X-Request-ID` header or generates a new one
func InitLogger ¶
InitLogger sets log level, format and output
func OpenFileLimit ¶ added in v0.6.3
func OpenFileLimit() (limitStr string)
OpenFileLimit returns a string displaying the current open file limit for the process or unknown if it's not possible to detect it
Types ¶
type LogHandler ¶
type LogHandler struct {
// contains filtered or unexported fields
}
LogHandler with TTY awareness
Click to show internal directories.
Click to hide internal directories.