Documentation ¶
Index ¶
- Constants
- func Count() string
- func Critical(args ...interface{})
- func Criticalf(format string, args ...interface{})
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Init(srvID string, conf *Config, kconf *kafka.Config) (err error)
- func PanicTraceLog(kb int) string
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- func Write(topic string, msg string) int
- type Config
- type CountST
- type TraceInfoST
- func (p *TraceInfoST) Critical(args ...interface{})
- func (p *TraceInfoST) Criticalf(format string, args ...interface{})
- func (p *TraceInfoST) Debug(args ...interface{})
- func (p *TraceInfoST) Debugf(format string, args ...interface{})
- func (p *TraceInfoST) Error(args ...interface{})
- func (p *TraceInfoST) Errorf(format string, args ...interface{})
- func (p *TraceInfoST) Info(args ...interface{})
- func (p *TraceInfoST) Infof(format string, args ...interface{})
- func (p *TraceInfoST) Print(args ...interface{})
- func (p *TraceInfoST) Printf(format string, args ...interface{})
- func (p *TraceInfoST) Println(args ...interface{})
- func (p *TraceInfoST) Warning(args ...interface{})
- func (p *TraceInfoST) Warningf(format string, args ...interface{})
Constants ¶
View Source
const ( CRITICAL = iota ERROR WARNING INFO DEBUG LevelMax )
View Source
const ( WR_LOG_CODE_SUCC = 0 WR_LOG_CODE_INPUT_ERR = 1 WR_LOG_CODE_FULL = 2 )
View Source
const (
BATCH_SEND_NUM = 5
)
View Source
const (
MAX_BUF_LEN = 10240
)
View Source
const (
NIL_PARENT = "nil"
)
Variables ¶
This section is empty.
Functions ¶
func PanicTraceLog ¶
Types ¶
type TraceInfoST ¶
type TraceInfoST struct { ParentID int64 `json:"parent_id"` //用于标识同一个服务的所有log,便于同一个服务名下的不同服务,IP不安全 SpanID int64 `json:"span_id"` //自己的调用链ID,比如和connID对应 TraceID int64 `json:"trace_id"` //用于标识本次请求,比如一个消息一个traceID FlowID int64 `json:"flow_id"` //处理流程模块的ID,便于分模块检查日志,比如io:1, logic:2 }
func NewLogTrace ¶
func NewLogTrace(traceid, spanid, parentid int64) (trace *TraceInfoST)
NewLogTrace ParentID :用于标识同一条连接的所有请求, SpanID : 自己的调用链ID, TraceID : 用于标识本次请求
func (*TraceInfoST) Critical ¶
func (p *TraceInfoST) Critical(args ...interface{})
func (*TraceInfoST) Criticalf ¶
func (p *TraceInfoST) Criticalf(format string, args ...interface{})
func (*TraceInfoST) Debug ¶
func (p *TraceInfoST) Debug(args ...interface{})
func (*TraceInfoST) Debugf ¶
func (p *TraceInfoST) Debugf(format string, args ...interface{})
func (*TraceInfoST) Error ¶
func (p *TraceInfoST) Error(args ...interface{})
func (*TraceInfoST) Errorf ¶
func (p *TraceInfoST) Errorf(format string, args ...interface{})
func (*TraceInfoST) Info ¶
func (p *TraceInfoST) Info(args ...interface{})
func (*TraceInfoST) Infof ¶
func (p *TraceInfoST) Infof(format string, args ...interface{})
func (*TraceInfoST) Print ¶
func (p *TraceInfoST) Print(args ...interface{})
func (*TraceInfoST) Printf ¶
func (p *TraceInfoST) Printf(format string, args ...interface{})
func (*TraceInfoST) Println ¶
func (p *TraceInfoST) Println(args ...interface{})
func (*TraceInfoST) Warning ¶
func (p *TraceInfoST) Warning(args ...interface{})
func (*TraceInfoST) Warningf ¶
func (p *TraceInfoST) Warningf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.