mirror of https://github.com/VinGarcia/ksql.git
Improve some comments
parent
a42c454387
commit
c97a3a6996
10
logger.go
10
logger.go
|
@ -13,6 +13,11 @@ 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
|
||||||
|
// query to the backend adapter will 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
|
||||||
|
@ -25,6 +30,11 @@ 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
|
||||||
|
// query to the backend adapter will 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) {
|
||||||
m := map[string]interface{}{
|
m := map[string]interface{}{
|
||||||
"query": values.Query,
|
"query": values.Query,
|
||||||
|
|
Loading…
Reference in New Issue