Skip to content

Commit 8cae63d

Browse files
committedOct 21, 2024
Add a log in the default batch callback if uploading to FireTail fails
1 parent afcc539 commit 8cae63d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎logging/default_batch_callback.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"errors"
77
"fmt"
8+
"log"
89
"net/http"
910
)
1011

@@ -53,5 +54,8 @@ func getDefaultBatchCallback(options BatchLoggerOptions) func([][]byte) {
5354
break
5455
}
5556
}
57+
if err != nil {
58+
log.Println("Error sending logs to Firetail API: ", err)
59+
}
5660
}
5761
}

0 commit comments

Comments
 (0)