Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(format string, args ...interface{})
- func Fatal(str string, args ...interface{})
- func Print(str string)
- func PrintStack()
- func Printf(format string, args ...interface{})
- func Printfln(format string, args ...interface{})
- func Println(str string)
- func SetLevel(level string)
- func SetTestLogger(tb testing.TB)
- func UnsetTestLogger()
- type FLogger
- func (logger *FLogger) Alert(args ...interface{})
- func (logger *FLogger) Alertf(format string, args ...interface{})
- func (logger *FLogger) Critical(args ...interface{})
- func (logger *FLogger) Criticalf(format string, args ...interface{})
- func (logger *FLogger) Debug(args ...interface{})
- func (logger *FLogger) Debugf(format string, args ...interface{})
- func (logger *FLogger) Emergency(args ...interface{})
- func (logger *FLogger) Emergencyf(format string, args ...interface{})
- func (logger *FLogger) Error(args ...interface{})
- func (logger *FLogger) Errorf(format string, args ...interface{})
- func (logger *FLogger) Info(args ...interface{})
- func (logger *FLogger) Infof(format string, args ...interface{})
- func (logger *FLogger) Level() (level Level)
- func (logger *FLogger) Notice(args ...interface{})
- func (logger *FLogger) Noticef(format string, args ...interface{})
- func (logger *FLogger) Printf(format string, args ...interface{})
- func (logger *FLogger) Println(args ...interface{})
- func (logger *FLogger) Warning(args ...interface{})
- func (logger *FLogger) Warningf(format string, args ...interface{})
- type Level
Constants ¶
const ( StandardLog = 0 DebugLog = 1 )
Variables ¶
var LogLevel int
var TestLogger testing.TB
Functions ¶
func PrintStack ¶
func PrintStack()
func SetTestLogger ¶
func UnsetTestLogger ¶
func UnsetTestLogger()
Types ¶
type FLogger ¶
type FLogger struct {
// contains filtered or unexported fields
}
A FLogger represents an active logging object that generates lines of output to an io.Writer.
func NewLogFromConfig ¶
NewLogFromConfig outputs logs to a file given by logpath
func (*FLogger) Alert ¶
func (logger *FLogger) Alert(args ...interface{})
Alert logs with an alert level and exits the program.
func (*FLogger) Alertf ¶
Alertf logs with an alert level and exits the program. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Critical ¶
func (logger *FLogger) Critical(args ...interface{})
Critical logs with a critical level and exits the program.
func (*FLogger) Criticalf ¶
Criticalf logs with a critical level and exits the program. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Debug ¶
func (logger *FLogger) Debug(args ...interface{})
Debug logs with a debug level.
func (*FLogger) Debugf ¶
Debugf logs with a debug level. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Emergency ¶
func (logger *FLogger) Emergency(args ...interface{})
Emergency logs with an emergency level and exits the program.
func (*FLogger) Emergencyf ¶
Emergencyf logs with an emergency level and exits the program. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Error ¶
func (logger *FLogger) Error(args ...interface{})
Error logs with an error level.
func (*FLogger) Errorf ¶
Errorf logs with an error level. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Info ¶
func (logger *FLogger) Info(args ...interface{})
Info logs with an info level.
func (*FLogger) Infof ¶
Infof logs with an info level. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Notice ¶
func (logger *FLogger) Notice(args ...interface{})
Notice logs with a notice level.
func (*FLogger) Noticef ¶
Noticef logs with a notice level. Arguments are handled in the manner of fmt.Printf.
func (*FLogger) Println ¶
func (logger *FLogger) Println(args ...interface{})
Println is implemented so this logger shares the same functions as "log"