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 Flush()
- func GetFlushTime() int
- func GetLogHistory() int
- func GetLogLevel() string
- func GetLogPath() string
- func GetMode() int
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetLogLevel(level string)
- func SetLogPath(logPath string)
- func SetLogToStderr(mode bool)
- func SetMode(mode int)
- func Warn(args ...interface{})
- func Warningf(format string, args ...interface{})
- type EasyFileHandler
- type EasyLogHandler
- type EasyLogger
- func (el *EasyLogger) Debug(args ...interface{})
- func (el *EasyLogger) Debugf(format string, args ...interface{})
- func (el *EasyLogger) Error(args ...interface{})
- func (el *EasyLogger) Errorf(format string, args ...interface{})
- func (el *EasyLogger) Fatal(args ...interface{})
- func (el *EasyLogger) Fatalf(format string, args ...interface{})
- func (el *EasyLogger) Flush()
- func (el *EasyLogger) GetFlushTime() int
- func (el *EasyLogger) GetLogHistory() int
- func (el *EasyLogger) GetLogLevel() string
- func (el *EasyLogger) GetLogPath() string
- func (el *EasyLogger) GetMode() int
- func (el *EasyLogger) Info(args ...interface{})
- func (el *EasyLogger) Infof(format string, args ...interface{})
- func (el *EasyLogger) Printf(format string, args ...interface{})
- func (el *EasyLogger) Println(args ...interface{})
- func (el *EasyLogger) SetLogLevel(level string)
- func (el *EasyLogger) SetLogPath(logPath string)
- func (el *EasyLogger) SetLogToStderr(mode bool)
- func (el *EasyLogger) SetMode(mode int)
- func (el *EasyLogger) Warn(args ...interface{})
- func (el *EasyLogger) Warnf(format string, args ...interface{})
Constants ¶
View Source
const ( LOG_LEVEL_DEBUG = 1 LOG_LEVEL_INFO = 2 LOG_LEVEL_WARN = 3 LOG_LEVEL_ERROR = 4 LOG_LEVEL_FATAL = 5 LOG_LEVEL_NONE = 6 LOG_MAX_FILE_SIZE = 1024 * 1024 * 1024 LOG_MAX_BUFFER_SIZE = 1024 * 1024 LOG_MAX_ROTATE_FILE_NUM = 10 LOG_DEPTH_GLOBAL = 4 LOG_DEPTH_HANDLER = 3 )
View Source
const ( WITH_FILE_LINE = 0 WITH_NO_FILE_LINE = 1 )
Variables ¶
This section is empty.
Functions ¶
func GetFlushTime ¶
func GetFlushTime() int
func GetLogHistory ¶
func GetLogHistory() int
func GetLogLevel ¶
func GetLogLevel() string
func GetLogPath ¶
func GetLogPath() string
func SetLogLevel ¶
func SetLogLevel(level string)
func SetLogPath ¶
func SetLogPath(logPath string)
func SetLogToStderr ¶
func SetLogToStderr(mode bool)
Types ¶
type EasyFileHandler ¶
type EasyFileHandler struct {
// contains filtered or unexported fields
}
func NewEasyFileHandler ¶
func NewEasyFileHandler(path string, bufferSize int) *EasyFileHandler
func (*EasyFileHandler) Flush ¶
func (efh *EasyFileHandler) Flush()
type EasyLogHandler ¶
type EasyLogger ¶
type EasyLogger struct {
// contains filtered or unexported fields
}
func GetLogger ¶
func GetLogger() *EasyLogger
func NewEasyLogger ¶
func NewEasyLogger(logLevel string, logToStderr bool, flushTime int, writer EasyLogHandler) *EasyLogger
func (*EasyLogger) Debug ¶
func (el *EasyLogger) Debug(args ...interface{})
func (*EasyLogger) Debugf ¶
func (el *EasyLogger) Debugf(format string, args ...interface{})
func (*EasyLogger) Error ¶
func (el *EasyLogger) Error(args ...interface{})
func (*EasyLogger) Errorf ¶
func (el *EasyLogger) Errorf(format string, args ...interface{})
func (*EasyLogger) Fatal ¶
func (el *EasyLogger) Fatal(args ...interface{})
func (*EasyLogger) Fatalf ¶
func (el *EasyLogger) Fatalf(format string, args ...interface{})
func (*EasyLogger) Flush ¶
func (el *EasyLogger) Flush()
func (*EasyLogger) GetFlushTime ¶
func (el *EasyLogger) GetFlushTime() int
func (*EasyLogger) GetLogHistory ¶
func (el *EasyLogger) GetLogHistory() int
func (*EasyLogger) GetLogLevel ¶
func (el *EasyLogger) GetLogLevel() string
func (*EasyLogger) GetLogPath ¶
func (el *EasyLogger) GetLogPath() string
func (*EasyLogger) GetMode ¶
func (el *EasyLogger) GetMode() int
func (*EasyLogger) Info ¶
func (el *EasyLogger) Info(args ...interface{})
func (*EasyLogger) Infof ¶
func (el *EasyLogger) Infof(format string, args ...interface{})
func (*EasyLogger) Printf ¶
func (el *EasyLogger) Printf(format string, args ...interface{})
func (*EasyLogger) Println ¶
func (el *EasyLogger) Println(args ...interface{})
func (*EasyLogger) SetLogLevel ¶
func (el *EasyLogger) SetLogLevel(level string)
func (*EasyLogger) SetLogPath ¶
func (el *EasyLogger) SetLogPath(logPath string)
func (*EasyLogger) SetLogToStderr ¶
func (el *EasyLogger) SetLogToStderr(mode bool)
func (*EasyLogger) SetMode ¶
func (el *EasyLogger) SetMode(mode int)
func (*EasyLogger) Warn ¶
func (el *EasyLogger) Warn(args ...interface{})
func (*EasyLogger) Warnf ¶
func (el *EasyLogger) Warnf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.