Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTraceWriter ¶
func NewTraceWriter(w io.WriteCloser) *traceWriter
NewTraceWriter return a tracer that will write the trace into w
Types ¶
type Tracer ¶
type Tracer interface { Close() error // To close file Print(vs ...interface{}) // like fmt.Print(a,b,c ...) Printf(f string, s ...interface{}) // like fmt.Printf("%d: %s",1254,"Hello") LogPacket(s string, p []byte) // to dump packet like hexdump -C f IsOn() bool // To check if trace is enabled }
Tracer is the interface for a Tracer. It is implemented as a full tracer : traceWriter a no-tracer: nilTracer
Click to show internal directories.
Click to hide internal directories.