Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func LogLevel2String(level uint32) string
- func Profile(format string, args ...interface{})
- func ProfileSetFlags(flags uint32)
- func RestLogger(logger *Logger, levels ...uint32)
- func RestProfileLogger(logger *Logger)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Cleaner
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Flush() error
- func (l *Logger) GetLevel() uint32
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Open() (*Logger, error)
- func (l *Logger) Output(calldepth int, level uint32, s string) error
- func (l *Logger) SetFlags(flags uint32)
- func (l *Logger) SetLogLevel(level uint32)
- func (l *Logger) SetRolling(t RollingType)
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- type RollingType
Constants ¶
View Source
const ( // Bits or'ed together to control what's printed. // There is no control over the order they appear (the order listed // here) or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // 2009/01/23 01:23:23 message // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message Ldate = 1 << iota // the date in the local time zone: 2009/01/23 Ltime // the time in the local time zone: 01:23:23 Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile // final file name element and line number: d.go:23. overrides Llongfile Llevel // LUTC // if Ldate or Ltime is set, use UTC rather than the local time zone LstdFlags = Ldate | Ltime // initial values for the standard logger )
View Source
const ( LogFatal uint32 = iota LogError LogWarning LogInfo LogDebug )
View Source
const ( LogFatalS = "fatal" LogErrorS = "error" LogWarningS = "warning" LogInfoS = "info" LogDebugS = "debug" )
Variables ¶
This section is empty.
Functions ¶
func LogLevel2String ¶
func ProfileSetFlags ¶
func ProfileSetFlags(flags uint32)
func RestLogger ¶
func RestProfileLogger ¶
func RestProfileLogger(logger *Logger)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func ProfileGetLogger ¶
func ProfileGetLogger() *Logger
func (*Logger) SetRolling ¶
func (l *Logger) SetRolling(t RollingType)
type RollingType ¶
type RollingType uint32
const ( RollingDeny RollingType = iota RollingByHour RollingByDay )
Click to show internal directories.
Click to hide internal directories.