Documentation ¶
Index ¶
- func Debug(msg string, data ...interface{})
- func Error(msg string, data ...interface{})
- func Fatal(msg string, data ...interface{})
- func Info(msg string, data ...interface{})
- func Panic(msg string, data ...interface{})
- func SetLevel(lvl Level)
- func UseLog(lg Logger)
- func Warn(msg string, data ...interface{})
- type Config
- type Level
- type Logger
- type StandardLogger
- func (s *StandardLogger) Debug(msg string, data []interface{})
- func (s *StandardLogger) Error(msg string, data []interface{})
- func (s *StandardLogger) Fatal(msg string, data []interface{})
- func (s *StandardLogger) Info(msg string, data []interface{})
- func (s *StandardLogger) Initialize(conf *Config)
- func (s *StandardLogger) Panic(msg string, data []interface{})
- func (s *StandardLogger) SetLevel(lvl int8)
- func (s *StandardLogger) Warn(msg string, data []interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fatal ¶
func Fatal(msg string, data ...interface{})
Description: log message with fatal level, then fatal(), you should avoid use this.
- Author: architect.bian
- Date: 2018/09/17 13:40
Types ¶
type Level ¶
type Level int8
const ( // DebugLevel logs are typically voluminous, and are usually disabled in production. DebugLevel Level = iota // InfoLevel is the default logging priority. InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel // DevDebugLevel logs are same as DebugLevel, but panic/fatal will print error like nomal DevDebugLevel // PanicLevel logs a message, then panics. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
func LevelParse ¶
type StandardLogger ¶
type StandardLogger struct {
// contains filtered or unexported fields
}
func (*StandardLogger) Debug ¶
func (s *StandardLogger) Debug(msg string, data []interface{})
func (*StandardLogger) Error ¶
func (s *StandardLogger) Error(msg string, data []interface{})
func (*StandardLogger) Fatal ¶
func (s *StandardLogger) Fatal(msg string, data []interface{})
func (*StandardLogger) Info ¶
func (s *StandardLogger) Info(msg string, data []interface{})
func (*StandardLogger) Initialize ¶
func (s *StandardLogger) Initialize(conf *Config)
func (*StandardLogger) Panic ¶
func (s *StandardLogger) Panic(msg string, data []interface{})
func (*StandardLogger) SetLevel ¶
func (s *StandardLogger) SetLevel(lvl int8)
func (*StandardLogger) Warn ¶
func (s *StandardLogger) Warn(msg string, data []interface{})
Click to show internal directories.
Click to hide internal directories.