Documentation ¶
Overview ¶
Package glogs is a global internal glogs glogs: this is extend package, use https://github.com/uber-go/zap
Index ¶
- Constants
- Variables
- func Default(writer *zap.Logger, level logger.LogLevel) logger.Interface
- func Error(r *http.Request, template string, args ...interface{})
- func GetSugar() *zap.Logger
- func GetWriter(filename string, lc *Config) io.Writer
- func Info(r *http.Request, template string, args ...interface{})
- func InitDing(key, host string)
- func InitSugar(lc *Config) *zap.Logger
- func SendDing(d *AlarmData)
- func StopSpan(span Span)
- func String(key string, value interface{}) zap.Field
- func Warn(r *http.Request, template string, args ...interface{})
- func WithRequest(r *http.Request) context.Context
- func WithValue(value string) context.Context
- type AlarmAt
- type AlarmData
- type AlarmMarkdown
- type AlarmMsg
- type AlarmText
- type Config
- type Field
- type GormCtx
- type Span
- type SpanContext
- type Tracer
Constants ¶
View Source
const ( LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
View Source
const ( TraceTypeJaeger = "jaeger" TraceTypeZipkin = "zipkin" )
View Source
const (
JaegerHeaderKey = jaeger.TraceContextHeaderName
)
View Source
const (
ZipkinHeaderKey = b3.TraceID
)
Variables ¶
View Source
var DingCh = make(chan *AlarmData, 10)
View Source
var (
RequestIdKey = "request_id"
)
Functions ¶
Types ¶
type AlarmData ¶
type AlarmMarkdown ¶
type AlarmMsg ¶
type AlarmMsg struct { MsgType string `json:"msgtype"` Text AlarmText `json:"text"` Markdown AlarmMarkdown `json:"markdown"` At AlarmAt `json:"at"` }
type Span ¶
type Span = opentracing.Span
func StartSpanP ¶
func StartSpanP(ctx SpanContext, name string) Span
type SpanContext ¶
type SpanContext = opentracing.SpanContext
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package logger is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.
|
Package logger is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify. |
Click to show internal directories.
Click to hide internal directories.