Documentation ¶
Index ¶
- Constants
- func LLogFileName() string
- type JKLogger
- func (l *JKLogger) ChangeFile(name string) error
- func (l *JKLogger) Debug(v ...interface{})
- func (l *JKLogger) Debugf(format string, v ...interface{})
- func (l *JKLogger) Debugln(v ...interface{})
- func (l *JKLogger) Error(v ...interface{})
- func (l *JKLogger) Errorf(format string, v ...interface{})
- func (l *JKLogger) Errorln(v ...interface{})
- func (l *JKLogger) Info(v ...interface{})
- func (l *JKLogger) Infof(format string, v ...interface{})
- func (l *JKLogger) Infoln(v ...interface{})
- func (l *JKLogger) InitLog(name string) error
- func (l *JKLogger) Reopen() error
- func (l *JKLogger) SetLevel(level int)
- func (l *JKLogger) Warn(v ...interface{})
- func (l *JKLogger) Warnf(format string, v ...interface{})
- func (l *JKLogger) Warnln(v ...interface{})
- type LogWrap
- type Logger
- func (l *Logger) Critical(v ...interface{})
- func (l *Logger) Criticalf(format string, v ...interface{})
- func (l *Logger) Criticalln(v ...interface{})
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Debugln(v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Errorln(v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Fatalln(v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Infoln(v ...interface{})
- func (l *Logger) Levels() int
- func (l *Logger) None(v ...interface{})
- func (l *Logger) Nonef(format string, v ...interface{})
- func (l *Logger) Noneln(v ...interface{})
- func (l *Logger) Notice(v ...interface{})
- func (l *Logger) Noticef(format string, v ...interface{})
- func (l *Logger) Noticeln(v ...interface{})
- func (l *Logger) Output(calldepth int, s string) error
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) Panicf(format string, v ...interface{})
- func (l *Logger) Panicln(v ...interface{})
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Println(v ...interface{})
- func (l *Logger) SetLevel(level int)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- func (l *Logger) Warnln(v ...interface{})
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). A colon appears after these items: // [log] 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message Ldate = log.Ldate // the date: 2009/01/23 Ltime = log.Ltime // the time: 01:23:23 Lmicroseconds = log.Lmicroseconds // microsecond resolution: 01:23:23.123123. assumes Ltime. Llongfile = log.Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile = log.Lshortfile // final file name element and line number: d.go:23. overrides Llongfile LstdFlags = log.LstdFlags | Lshortfile // initial values for the standard logger )
These flags define which text to prefix to each log entry generated by the Logger.
View Source
const ( LEVEL_DISABLE = 0 //关闭日志功能 LEVEL_DEBUG = 1 << iota LEVEL_NOTICE LEVEL_INFO LEVEL_WARN LEVEL_ERROR LEVEL_CRITICAL LEVEL_PANIC )
日志级别
View Source
const ( LEVEL_FATAL = "[FATAL]" LEVEL_ALL = LEVEL_DEBUG | LEVEL_NOTICE | LEVEL_INFO | LEVEL_WARN | LEVEL_ERROR | LEVEL_CRITICAL | LEVEL_PANIC //默认日志级别为 LEVEL_DEFAULT = LEVEL_INFO | LEVEL_WARN | LEVEL_ERROR | LEVEL_CRITICAL | LEVEL_PANIC LEVEL_MUCH = LEVEL_NOTICE | LEVEL_INFO | LEVEL_WARN | LEVEL_ERROR | LEVEL_CRITICAL | LEVEL_PANIC LEVEL_IMPORTANT = LEVEL_ERROR | LEVEL_CRITICAL | LEVEL_PANIC )
Variables ¶
This section is empty.
Functions ¶
func LLogFileName ¶
func LLogFileName() string
Types ¶
type JKLogger ¶
type JKLogger struct {
// contains filtered or unexported fields
}
func (*JKLogger) ChangeFile ¶
type Logger ¶
func SetLogFileName ¶
func (*Logger) Criticalln ¶
func (l *Logger) Criticalln(v ...interface{})
Click to show internal directories.
Click to hide internal directories.