Documentation ¶
Index ¶
- Variables
- func ChildContext(ctx interface{}, text string, args ...interface{}) context.Context
- func Debug(text string)
- func Debugf(text string, args ...interface{})
- func Debugfc(ctx interface{}, text string, args ...interface{})
- func Error(text string)
- func Errorf(text string, args ...interface{})
- func Errorfc(ctx interface{}, text string, args ...interface{})
- func Info(text string)
- func Infof(text string, args ...interface{})
- func Infofc(ctx interface{}, text string, args ...interface{})
- func IrisBind(ctx iris.Context)
- func NewContext() context.Context
- func NewLine(ctx interface{}, level interfaces.Level, text string, args []interface{}) interfaces.LineInterface
- func NewTracing() interfaces.TraceInterface
- func Panic(text string)
- func Panicf(text string, args ...interface{})
- func Panicfc(ctx interface{}, text string, args ...interface{})
- func ParseTracing(ctx interface{}) interfaces.TraceInterface
- func ParseTracingToRequest(ctx interface{}, req *http.Request)
- func Warn(text string)
- func Warnf(text string, args ...interface{})
- func Warnfc(ctx interface{}, text string, args ...interface{})
- type Line
- func (o *Line) ColorLevel() string
- func (o *Line) Content() string
- func (o *Line) Duration() float64
- func (o *Line) Level() string
- func (o *Line) ParentSpanId() string
- func (o *Line) Pid() int
- func (o *Line) RequestInfo() (method string, url string)
- func (o *Line) ServiceAddr() string
- func (o *Line) ServiceName() string
- func (o *Line) SpanId() string
- func (o *Line) SpanVersion() string
- func (o *Line) Time() time.Time
- func (o *Line) Timeline() string
- func (o *Line) TraceId() string
- func (o *Line) Tracing() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Config interfaces.ConfigInterface Client interfaces.ClientInterface )
Functions ¶
func ChildContext ¶
子级上下文.
func Debugfc ¶
func Debugfc(ctx interface{}, text string, args ...interface{})
添加Debug日志, 支持格式化和请求链.
func Errorfc ¶
func Errorfc(ctx interface{}, text string, args ...interface{})
添加Error日志, 支持格式化和请求链.
func IrisBind ¶
func IrisBind(ctx iris.Context)
绑定Tracing. 在请求的入口进行绑定, 请求过程即可复用. 整个业务过程中使用 绑定后的Context, 可以保障同一个请求下的日志含相同的Span、 Trace待标识.
func NewLine ¶
func NewLine(ctx interface{}, level interfaces.Level, text string, args []interface{}) interfaces.LineInterface
创建日志行实例.
func ParseTracingToRequest ¶
Types ¶
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
日志行结构体.
func (*Line) ServiceAddr ¶
func (*Line) ServiceName ¶
func (*Line) SpanVersion ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.