Minor improvement to ksql.Logger output

This commit is contained in:
Vinícius Garcia 2023-07-16 22:47:38 -03:00
parent 7edbd04ceb
commit 8d57a16f9c

View File

@ -56,7 +56,14 @@ func (l LogValues) MarshalJSON() ([]byte, error) {
}
out.Query = l.Query
out.Params = l.Params
// Force it to print Params: [], instead of Params: null
if out.Params == nil {
out.Params = []interface{}{}
}
if l.Err != nil {
out.Err = l.Err.Error()
}