add a generic Log() function to the connection tracer

This commit is contained in:
Marten Seemann
2020-11-27 11:52:33 +07:00
parent a76879c305
commit ff1f433c36
9 changed files with 66 additions and 0 deletions

View File

@@ -462,3 +462,16 @@ func (e eventCongestionStateUpdated) IsNil() bool { return false }
func (e eventCongestionStateUpdated) MarshalJSONObject(enc *gojay.Encoder) {
enc.StringKey("new", e.state.String())
}
type eventGeneric struct {
name string
msg string
}
func (e eventGeneric) Category() category { return categoryTransport }
func (e eventGeneric) Name() string { return e.name }
func (e eventGeneric) IsNil() bool { return false }
func (e eventGeneric) MarshalJSONObject(enc *gojay.Encoder) {
enc.StringKey("details", e.msg)
}