Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(v ...interface{})
- func DebugError(err error, v ...interface{})
- func DebugErrorf(err error, format string, v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func ErrorError(err error, v ...interface{})
- func ErrorErrorf(err error, format string, v ...interface{})
- func Errorf(format string, v ...interface{})
- func Flags() int
- func Info(v ...interface{})
- func InfoError(err error, v ...interface{})
- func InfoErrorf(err error, format string, v ...interface{})
- func Infof(format string, v ...interface{})
- func MustOpenFile(path string) *os.File
- func NewRollingFile(basePath string, maxFileFrag int, maxFragSize int64) (io.WriteCloser, error)
- func NopCloser(w io.Writer) io.WriteCloser
- func OpenFile(path string) (*os.File, error)
- func Panic(v ...interface{})
- func PanicError(err error, v ...interface{})
- func PanicErrorf(err error, format string, v ...interface{})
- func Panicf(format string, v ...interface{})
- func Prefix() string
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SetFlags(flags int)
- func SetLevel(v LogLevel)
- func SetPrefix(prefix string)
- func SetTrace(v LogLevel)
- func Warn(v ...interface{})
- func WarnError(err error, v ...interface{})
- func WarnErrorf(err error, format string, v ...interface{})
- func Warnf(format string, v ...interface{})
- type LogLevel
- type LogType
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) DebugError(err error, v ...interface{})
- func (l *Logger) DebugErrorf(err error, format string, v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) ErrorError(err error, v ...interface{})
- func (l *Logger) ErrorErrorf(err error, format string, v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Flags() int
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) InfoError(err error, v ...interface{})
- func (l *Logger) InfoErrorf(err error, format string, v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) PanicError(err error, v ...interface{})
- func (l *Logger) PanicErrorf(err error, format string, v ...interface{})
- func (l *Logger) Panicf(format string, v ...interface{})
- func (l *Logger) Prefix() string
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Println(v ...interface{})
- func (l *Logger) SetFlags(flags int)
- func (l *Logger) SetLevel(v LogLevel)
- func (l *Logger) SetPrefix(prefix string)
- func (l *Logger) SetTraceLevel(v LogLevel)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) WarnError(err error, v ...interface{})
- func (l *Logger) WarnErrorf(err error, format string, v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
Constants ¶
View Source
const ( Ldate = log.Ldate Llongfile = log.Llongfile Lmicroseconds = log.Lmicroseconds Lshortfile = log.Lshortfile LstdFlags = log.LstdFlags Ltime = log.Ltime )
View Source
const ( TYPE_ERROR = LogType(1 << iota) TYPE_WARN TYPE_INFO TYPE_DEBUG TYPE_PANIC = LogType(^0) )
View Source
const ( LEVEL_NONE = LogLevel(1<<iota - 1) LEVEL_ERROR LEVEL_WARN LEVEL_INFO LEVEL_DEBUG LEVEL_ALL = LEVEL_DEBUG )
Variables ¶
View Source
var ErrClosedRollingFile = errors.New("rolling file is closed")
View Source
var StdLog = New(NopCloser(os.Stderr), "")
Functions ¶
func DebugError ¶
func DebugError(err error, v ...interface{})
func DebugErrorf ¶
func ErrorError ¶
func ErrorError(err error, v ...interface{})
func ErrorErrorf ¶
func InfoErrorf ¶
func MustOpenFile ¶
func NewRollingFile ¶
func PanicError ¶
func PanicError(err error, v ...interface{})
func PanicErrorf ¶
func WarnErrorf ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func MustFileLog ¶
func (*Logger) DebugError ¶
func (*Logger) DebugErrorf ¶
func (*Logger) ErrorError ¶
func (*Logger) ErrorErrorf ¶
func (*Logger) InfoErrorf ¶
func (*Logger) PanicError ¶
func (*Logger) PanicErrorf ¶
func (*Logger) SetTraceLevel ¶
func (*Logger) WarnErrorf ¶
Click to show internal directories.
Click to hide internal directories.