Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(values ...interface{})
- func Disrupt(values ...interface{})
- func Emergency(values ...interface{})
- func Error(values ...interface{})
- func Fatal(values ...interface{})
- func Info(values ...interface{})
- func InterfacesToStrings(arg []interface{}) []string
- func SetFunctionSkip(_skip int)
- func SetLevel(level LogLevel)
- func SetLevelOrDefault(level interface{}, defaultLevel LogLevel)
- func Trace(values ...interface{})
- func Warn(values ...interface{})
- type FilePath
- type LogLevel
- type MethodName
- type OutputFunc
- type ProgramLine
Constants ¶
View Source
const ( LOG_LEVEL_TRACE LogLevel = 401 LOG_LEVEL_DEBUG LogLevel = 400 LOG_LEVEL_INFO LogLevel = 300 LOG_LEVEL_WARN LogLevel = 200 LOG_LEVEL_ERROR LogLevel = 100 LOG_LEVEL_EMERGENCY LogLevel = -1 LOG_LEVEL_FATAL LogLevel = -2 LOG_LEVEL_DISRUPT LogLevel = -999 DEFAULT_SKIP int = 3 DEFAULT_LOG_LEVEL LogLevel = LOG_LEVEL_INFO )
Variables ¶
View Source
var ( SetWriter = log.SetOutput TraceOutput = func(values []interface{}, filePath FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(filePath), " / ", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } DebugOutput = func(values []interface{}, filePath FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(filePath), " / ", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } InfoOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } WarnOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } ErrorOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } EmergencyOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } FatalOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } DisruptOutput = func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string { return []string{"[", string(name), "]: ", strings.Join(InterfacesToStrings(values), " ")} } )
Functions ¶
func InterfacesToStrings ¶
func InterfacesToStrings(arg []interface{}) []string
func SetFunctionSkip ¶
func SetFunctionSkip(_skip int)
func SetLevelOrDefault ¶
func SetLevelOrDefault(level interface{}, defaultLevel LogLevel)
Types ¶
type MethodName ¶
type MethodName string
type OutputFunc ¶ added in v0.0.4
type OutputFunc func(values []interface{}, _ FilePath, line ProgramLine, name MethodName) []string
type ProgramLine ¶
type ProgramLine int
Click to show internal directories.
Click to hide internal directories.