Documentation ¶
Index ¶
- Constants
- Variables
- func GetErrorFormatter() string
- func NewErrorLogger(out io.Writer, prefix string) *errorLogger
- func SetErrorOutput(destination *os.File)
- func SetInfoOutput(destination *os.File)
- func SetWarningOutput(destination *os.File)
- func UpdateLogLevel(newLevel string) error
- type LogLevelError
Constants ¶
View Source
const ( NormalLogLevel = "NORMAL" DevelLogLevel = "DEVEL" ErrorLogLevel = "ERROR" )
Variables ¶
View Source
var DebugLogger = NewErrorLogger(ioutil.Discard, "DEBUG: ")
View Source
var ErrorLogger = NewErrorLogger(os.Stderr, "ERROR: ")
View Source
var InfoLogger = NewErrorLogger(os.Stderr, "INFO: ")
View Source
var LogLevels = []string{NormalLogLevel, DevelLogLevel, ErrorLogLevel}
View Source
var WarningLogger = NewErrorLogger(os.Stderr, "WARNING: ")
Functions ¶
func GetErrorFormatter ¶
func GetErrorFormatter() string
func NewErrorLogger ¶
func SetErrorOutput ¶
func SetInfoOutput ¶
func SetWarningOutput ¶
func UpdateLogLevel ¶
Types ¶
type LogLevelError ¶
type LogLevelError struct {
// contains filtered or unexported fields
}
func NewLogLevelError ¶
func NewLogLevelError() LogLevelError
func (LogLevelError) Error ¶
func (err LogLevelError) Error() string
Click to show internal directories.
Click to hide internal directories.