Documentation ¶
Index ¶
- Constants
- func Log() zap.Option
- func Print(msg string) error
- func PrintWithData(data any, msg string) error
- func Printf(f string, a ...any) error
- func PrintfWithData(data any, f string, a ...any) error
- func Start(bufsize int) error
- func StartWithCallback(cb EventCallback)
- func Stop() error
- func With(cb func() error, bufsize int) error
- type Breakpoint
- type Event
- type EventCallback
- type Stacktrace
Constants ¶
View Source
const ( DebugLevel uint8 = iota + 1 // InfoLevel is the default logging priority. InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. DPanicLevel // PanicLevel logs a message, then panics. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
Variables ¶
This section is empty.
Functions ¶
func PrintWithData ¶
func StartWithCallback ¶
func StartWithCallback(cb EventCallback)
Types ¶
type Breakpoint ¶
type Breakpoint struct { ID int `cbor:"id" json:"id"` Name string `cbor:"name,omitempty" json:"name,omitempty"` TotalHitCount uint64 `cbor:"total_hit_count,omitempty" json:"total_hit_count,omitempty"` HitCount map[string]uint64 `cbor:"hit_count,omitempty" json:"hit_count,omitempty"` Variables []api.Variable `cbor:"vars,omitempty" json:"vars,omitempty"` Arguments []api.Variable `cbor:"args,omitempty" json:"args,omitempty"` Locals []api.Variable `cbor:"locals,omitempty" json:"locals,omitempty"` Stacktrace []api.Stackframe `cbor:"stack,omitempty" json:"stack,omitempty"` }
func (*Breakpoint) Argument ¶
func (b *Breakpoint) Argument(name string) string
func (*Breakpoint) Local ¶
func (b *Breakpoint) Local(name string) string
func (*Breakpoint) Variable ¶
func (b *Breakpoint) Variable(name string) string
type Event ¶
type Event struct { Timestamp time.Time `cbor:"time" json:"time"` Type string `cbor:"type" json:"type"` Level uint8 `cbor:"lvl,omitempty" json:"lvl,omitempty"` Message string `cbor:"msg,omitempty" json:"msg,omitempty"` Source string `cbor:"src,omitempty" json:"src,omitempty"` PID int `cbor:"pid,omitempty" json:"pid,omitempty"` Function string `cbor:"func,omitempty" json:"func,omitempty"` File string `cbor:"file,omitempty" json:"file,omitempty"` Line int `cbor:"line,omitempty" json:"line,omitempty"` Breakpoint *Breakpoint `cbor:"breakpoint,omitempty" json:"breakpoint,omitempty"` Data any `cbor:"data,omitempty" json:"data,omitempty"` }
func (*Event) MarshalJSON ¶
type EventCallback ¶
type EventCallback func(e Event)
type Stacktrace ¶
type Stacktrace struct { Arguments []api.Variable `cbor:"arguments,omitempty" json:"arguments,omitempty"` Locals []api.Variable `cbor:"locals,omitempty" json:"locals,omitempty"` Function string `cbor:"function,omitempty" json:"function,omitempty"` File string `cbor:"file,omitempty" json:"file,omitempty"` Line int `cbor:"line,omitempty" json:"line,omitempty"` }
Click to show internal directories.
Click to hide internal directories.