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 NewRollingFile(basePath string, rolling RollingFormat) (io.WriteCloser, error)
- func NopCloser(w io.Writer) io.WriteCloser
- 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 SetLevelString(s string) bool
- 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) SetLevelString(s string) bool
- 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{})
- type RollingFormat
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 ( LevelNone = LogLevel(1<<iota - 1) LevelError LevelWarn LevelInfo LevelDebug LevelAll = LevelDebug )
View Source
const ( MonthlyRolling RollingFormat = "2006-01" DailyRolling = "2006-01-02" HourlyRolling = "2006-01-02-15" MinutelyRolling = "2006-01-02-15-04" SecondlyRolling = "2006-01-02-15-04-05" )
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 NewRollingFile ¶
func NewRollingFile(basePath string, rolling RollingFormat) (io.WriteCloser, error)
func PanicError ¶
func PanicError(err error, v ...interface{})
func PanicErrorf ¶
func SetLevelString ¶
func WarnErrorf ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) DebugError ¶
func (*Logger) DebugErrorf ¶
func (*Logger) ErrorError ¶
func (*Logger) ErrorErrorf ¶
func (*Logger) InfoErrorf ¶
func (*Logger) PanicError ¶
func (*Logger) PanicErrorf ¶
func (*Logger) SetLevelString ¶
func (*Logger) SetTraceLevel ¶
func (*Logger) WarnErrorf ¶
type RollingFormat ¶
type RollingFormat string
Click to show internal directories.
Click to hide internal directories.