Documentation
¶
Index ¶
- Constants
- Variables
- func Connect(apiEndpoint string, apiKey string, stream bool)
- func ConnectLocal()
- func Debug(messageTemplate string, params ...interface{})
- func Error(messageTemplate string, params ...interface{})
- func ExtractParams(mt string, v ...interface{}) (map[string]string, error)
- func Fatal(messageTemplate string, params ...interface{})
- func Info(messageTemplate string, params ...interface{})
- func Log(level int, messageTemplate string, params ...interface{})
- func RenderMsgTemplate(mt string, params map[string]string) string
- func Trace(messageTemplate string, params ...interface{})
- func Warn(messageTemplate string, params ...interface{})
- type Logger
- func (l *Logger) Debug(messageTemplate string, params ...interface{})
- func (l *Logger) DisableConsole()
- func (l *Logger) EnableConsole()
- func (l *Logger) Error(messageTemplate string, params ...interface{})
- func (l *Logger) Fatal(messageTemplate string, params ...interface{})
- func (l *Logger) Info(messageTemplate string, params ...interface{})
- func (l *Logger) Log(level int, messageTemplate string, params ...interface{})
- func (l *Logger) SetOutputLevel(level int)
- func (l *Logger) Trace(messageTemplate string, params ...interface{})
- func (l *Logger) Warn(messageTemplate string, params ...interface{})
Constants ¶
View Source
const ( TRACE = 10 DEBUG = 20 INFO = 30 WARN = 40 ERROR = 50 FATAL = 60 )
Variables ¶
View Source
var LogLevelNumber = map[int]string{
10: "TRACE",
20: "DEBUG",
30: "INFO",
40: "WARN",
50: "ERROR",
60: "FATAL",
}
Functions ¶
func ConnectLocal ¶
func ConnectLocal()
func RenderMsgTemplate ¶
render message template with a parameters map
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLoggerLocal ¶
func (*Logger) DisableConsole ¶
func (l *Logger) DisableConsole()
func (*Logger) EnableConsole ¶
func (l *Logger) EnableConsole()
func (*Logger) SetOutputLevel ¶
Click to show internal directories.
Click to hide internal directories.