Improve godoc strings

pull/42/head
Vinícius Garcia 2023-07-16 22:32:10 -03:00
parent 8198548deb
commit 7edbd04ceb
1 changed files with 4 additions and 6 deletions

View File

@ -14,10 +14,9 @@ var _ LoggerFn = ErrorLogger
// ErrorLogger is a builtin logger that can be passed to // ErrorLogger is a builtin logger that can be passed to
// ksql.InjectLogger() to only log when an error occurs. // ksql.InjectLogger() to only log when an error occurs.
// //
// Note: Only errors that happen after KSQL sends the // Note that only errors that happen after KSQL sends the
// query to the backend adapter will be logged. // query to the backend adapter will be logged.
// // Any errors that happen before that will not be logged.
// Validation errors will just return an error as usual.
func ErrorLogger(ctx context.Context, values LogValues) { func ErrorLogger(ctx context.Context, values LogValues) {
if values.Err == nil { if values.Err == nil {
return return
@ -31,10 +30,9 @@ var _ LoggerFn = Logger
// Logger is a builtin logger that can be passed to // Logger is a builtin logger that can be passed to
// ksql.InjectLogger() to log every query and query errors. // ksql.InjectLogger() to log every query and query errors.
// //
// Note: Only errors that happen after KSQL sends the // Note that only errors that happen after KSQL sends the
// query to the backend adapter will be logged. // query to the backend adapter will be logged.
// // Any errors that happen before that will not be logged.
// Validation errors will just return an error as usual.
func Logger(ctx context.Context, values LogValues) { func Logger(ctx context.Context, values LogValues) {
b, _ := json.Marshal(values) b, _ := json.Marshal(values)
logPrinter(string(b)) logPrinter(string(b))