// NewPrefixedLogger creates new instance of pluggable logger using specified // prefix. func NewPrefixedLogger(prefix string) lorg.Logger { if prefix != "" { prefix += " " } format := lorg.NewFormat(logFormatting) format.SetPlaceholder("prefix", func(_ lorg.Level, _ string) string { return prefix }) logger := lorg.NewLog() logger.SetFormat(format) return logger }
func init() { format := lorg.NewFormat(logFormatString) logger.SetFormat(format) }