Versions in this module Expand all Collapse all v0 v0.0.3 Aug 6, 2021 Changes in this version + const AdapterAliLS + const AdapterConn + const AdapterConsole + const AdapterDingtalk + const AdapterEs + const AdapterFile + const AdapterJianLiao + const AdapterMail + const AdapterMultiFile + const AdapterSlack + const DiscardNonColorEscSeq + const LevelAlert + const LevelCritical + const LevelDebug + const LevelEmergency + const LevelError + const LevelInfo + const LevelInformational + const LevelNotice + const LevelTrace + const LevelWarn + const LevelWarning + const OutputNonColorEscSeq + var LevelPrefix = [LevelDebug + 1]string + func Alert(f interface{}, v ...interface{}) + func ColorByMethod(cond bool, method string) string + func ColorByStatus(cond bool, code int) string + func Critical(f interface{}, v ...interface{}) + func Debug(f interface{}, v ...interface{}) + func Emergency(f interface{}, v ...interface{}) + func EnableFuncCallDepth(b bool) + func Error(f interface{}, v ...interface{}) + func FormatTimeHeader(when time.Time) ([]byte, int) + func GetCallStack(skip int, frames int, filter string) (CallStack, sf string) + func GetLogger(prefixes ...string) *log.Logger + func Info(f interface{}, v ...interface{}) + func Informational(f interface{}, v ...interface{}) + func NewAnsiColorWriter(w io.Writer) io.Writer + func NewModeAnsiColorWriter(w io.Writer, mode outputMode) io.Writer + func Notice(f interface{}, v ...interface{}) + func Register(name string, log newLoggerFunc) + func Reset() + func SetLevel(l int) + func SetLogFuncCall(b bool) + func SetLogFuncCallDepth(d int) + func SetLogger(adapter string, config ...string) error + func Trace(f interface{}, v ...interface{}) + func W32Debug(msg string) + func Warn(f interface{}, v ...interface{}) + func Warning(f interface{}, v ...interface{}) + type BeeLogger struct + ProcessID string + func Async(msgLen ...int64) *BeeLogger + func GetBeeLogger() *BeeLogger + func NewLogger(channelLens ...int64) *BeeLogger + func (bl *BeeLogger) Alert(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Async(msgLen ...int64) *BeeLogger + func (bl *BeeLogger) BiReport(msg string) + func (bl *BeeLogger) Close() + func (bl *BeeLogger) Critical(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Debug(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) DelLogger(adapterName string) error + func (bl *BeeLogger) Emergency(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) EnableFuncCallDepth(b bool) + func (bl *BeeLogger) Error(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Flush() + func (bl *BeeLogger) GetLogFuncCallDepth() int + func (bl *BeeLogger) Info(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Informational(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Notice(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Reset() + func (bl *BeeLogger) SetContentType(b string) + func (bl *BeeLogger) SetFormatFunc(d FormatFunc) + func (bl *BeeLogger) SetLevel(l int) + func (bl *BeeLogger) SetLogFuncCallDepth(d int) + func (bl *BeeLogger) SetLogger(adapterName string, configs ...string) error + func (bl *BeeLogger) Trace(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Warn(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Warning(span *BeegoTraceSpan, format string, v ...interface{}) + func (bl *BeeLogger) Write(p []byte) (n int, err error) + type BeegoTraceSpan struct + Span string + Trace string + type DingtalkWriter struct + Level int + WebhookURL string + func (s *DingtalkWriter) Destroy() + func (s *DingtalkWriter) Flush() + func (s *DingtalkWriter) Init(jsonconfig string) error + func (s *DingtalkWriter) WriteMsg(when time.Time, msg string, level int) error + func (s *DingtalkWriter) WriteOriginalMsg(when time.Time, msg string, level int) error + type FormatFunc func(when time.Time, span *BeegoTraceSpan, logLevel int, msg string, ...) (string, error) + func DefineErrorLogFunc(processId string, loggerFuncCallDepth int) FormatFunc + type JLWriter struct + AuthorName string + ImageURL string + Level int + RedirectURL string + Title string + WebhookURL string + func (s *JLWriter) Destroy() + func (s *JLWriter) Flush() + func (s *JLWriter) Init(jsonconfig string) error + func (s *JLWriter) WriteMsg(when time.Time, msg string, level int) error + func (s *JLWriter) WriteOriginalMsg(when time.Time, msg string, level int) error + type JsonStruct struct + ContextParam interface{} + ErrorMsg interface{} + ErrorReport interface{} + EventId string + EventParams interface{} + File string + FormatTime string + Level string + Message string + ProcessId string + Rparam interface{} + Stack string + SubEventId interface{} + TimeStamp int64 + TraceId string + TraceSpan string + type Logger interface + Destroy func() + Flush func() + Init func(config string) error + WriteMsg func(when time.Time, msg string, level int) error + WriteOriginalMsg func(when time.Time, msg string, level int) error + func NewConn() Logger + func NewConsole() Logger + func NewFileWriter() Logger + type SLACKWriter struct + Level int + WebhookURL string + func (s *SLACKWriter) Destroy() + func (s *SLACKWriter) Flush() + func (s *SLACKWriter) Init(jsonconfig string) error + func (s *SLACKWriter) WriteMsg(when time.Time, msg string, level int) error + func (s *SLACKWriter) WriteOriginalMsg(when time.Time, msg string, level int) error + type SMTPWriter struct + FromAddress string + Host string + Level int + Password string + RecipientAddresses []string + Subject string + Username string + func (s *SMTPWriter) Destroy() + func (s *SMTPWriter) Flush() + func (s *SMTPWriter) Init(jsonconfig string) error + func (s *SMTPWriter) WriteMsg(when time.Time, msg string, level int) error + func (s *SMTPWriter) WriteOriginalMsg(when time.Time, msg string, level int) error v0.0.2 Aug 5, 2021