Documentation ¶ Index ¶ Variables func InitLogging(config *LogConfig) error func Log(level LogLevel, format string, v ...interface{}) type LogConfig type LogLevel Constants ¶ This section is empty. Variables ¶ View Source var ( InfoLogger *log.Logger ErrorLogger *log.Logger WarningLogger *log.Logger DebugLogger *log.Logger ) Functions ¶ func InitLogging ¶ func InitLogging(config *LogConfig) error func Log ¶ func Log(level LogLevel, format string, v ...interface{}) Log formats and writes log messages with source file information Types ¶ type LogConfig ¶ type LogConfig struct { LogDir string MaxSize int64 // Maximum size of log file in bytes MaxBackups int // Maximum number of old log files to retain LogLevel LogLevel } type LogLevel ¶ type LogLevel int const ( DEBUG LogLevel = iota INFO WARNING ERROR ) Source Files ¶ View all Source files logging.go Click to show internal directories. Click to hide internal directories.