Documentation ¶
Index ¶
- Variables
- func Debug(format string, v ...interface{})
- func Error(format string, v ...interface{})
- func Info(format string, v ...interface{})
- func InitLog(logWay string, logFile string, logLevel string, maxdays int64)
- func SetLogFile(logWay string, logFile string, maxdays int64)
- func SetLogLevel(logLevel string)
- func Trace(format string, v ...interface{})
- func Warn(format string, v ...interface{})
- type Logger
- type PrefixLogger
- func (pl *PrefixLogger) AddLogPrefix(prefix string)
- func (pl *PrefixLogger) ClearLogPrefix()
- func (pl *PrefixLogger) Debug(format string, v ...interface{})
- func (pl *PrefixLogger) Error(format string, v ...interface{})
- func (pl *PrefixLogger) GetAllPrefix() []string
- func (pl *PrefixLogger) GetPrefixStr() string
- func (pl *PrefixLogger) Info(format string, v ...interface{})
- func (pl *PrefixLogger) Trace(format string, v ...interface{})
- func (pl *PrefixLogger) Warn(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var Log *logs.BeeLogger
Log is the under log object
Functions ¶
func SetLogFile ¶
SetLogFile to configure log params logWay: file or console
func SetLogLevel ¶
func SetLogLevel(logLevel string)
SetLogLevel set log level, default is warning value: error, warning, info, debug, trace
Types ¶
type Logger ¶
type Logger interface { AddLogPrefix(string) GetPrefixStr() string GetAllPrefix() []string ClearLogPrefix() Error(string, ...interface{}) Warn(string, ...interface{}) Info(string, ...interface{}) Debug(string, ...interface{}) Trace(string, ...interface{}) }
Logger is the log interface
type PrefixLogger ¶
type PrefixLogger struct {
// contains filtered or unexported fields
}
func NewPrefixLogger ¶
func NewPrefixLogger(prefix string) *PrefixLogger
func (*PrefixLogger) AddLogPrefix ¶
func (pl *PrefixLogger) AddLogPrefix(prefix string)
func (*PrefixLogger) ClearLogPrefix ¶
func (pl *PrefixLogger) ClearLogPrefix()
func (*PrefixLogger) Debug ¶
func (pl *PrefixLogger) Debug(format string, v ...interface{})
func (*PrefixLogger) Error ¶
func (pl *PrefixLogger) Error(format string, v ...interface{})
func (*PrefixLogger) GetAllPrefix ¶
func (pl *PrefixLogger) GetAllPrefix() []string
func (*PrefixLogger) GetPrefixStr ¶ added in v0.13.0
func (pl *PrefixLogger) GetPrefixStr() string
func (*PrefixLogger) Info ¶
func (pl *PrefixLogger) Info(format string, v ...interface{})
func (*PrefixLogger) Trace ¶
func (pl *PrefixLogger) Trace(format string, v ...interface{})
func (*PrefixLogger) Warn ¶
func (pl *PrefixLogger) Warn(format string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.