Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Mode LoggerType OutputFile string }
Config is used to config a logger
type Logger ¶
type Logger interface { Debugf(template string, args ...interface{}) Infof(template string, args ...interface{}) Warnf(template string, args ...interface{}) Errorf(template string, args ...interface{}) // Fatal must execute os.Exit(1) after logging Fatalf(template string, args ...interface{}) // Panic must execute panic() after logging Panicf(template string, args ...interface{}) }
Logger is used here to de-couple logging framework
type LoggerType ¶
type LoggerType int
LoggerType provide options for human readable or json output
const ( MACHINE LoggerType = iota HUMAN )
Logger Type
func ConvertToLoggerType ¶
func ConvertToLoggerType(input string) LoggerType
ConvertToLoggerType convert input string to LoggerType no error is returned
Click to show internal directories.
Click to hide internal directories.