This commit is contained in:
parent
606c42cd5e
commit
050de1a0b3
@ -74,7 +74,7 @@ func (w *LokiWriter) Write(p []byte) (n int, err error) {
|
||||
return 0, fmt.Errorf("failed to marshal payload: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf("Sending payload to Loki: %s\n", string(payloadBytes))
|
||||
//fmt.Printf("Sending payload to Loki: %s\n", string(payloadBytes))
|
||||
|
||||
req, err := http.NewRequest("POST", w.url, bytes.NewReader(payloadBytes))
|
||||
if err != nil {
|
||||
@ -88,7 +88,7 @@ func (w *LokiWriter) Write(p []byte) (n int, err error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
fmt.Printf("Loki response status: %d\n", resp.StatusCode)
|
||||
//fmt.Printf("Loki response status: %d\n", resp.StatusCode)
|
||||
if resp.StatusCode != http.StatusNoContent {
|
||||
return 0, fmt.Errorf("received non-204 response from Loki: %d", resp.StatusCode)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user