summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/http/http.go3
-rw-r--r--internal/log/rotate.go4
2 files changed, 5 insertions, 2 deletions
diff --git a/internal/http/http.go b/internal/http/http.go
index 555c5bb..7b9b70d 100644
--- a/internal/http/http.go
+++ b/internal/http/http.go
@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"io"
+ "log/slog"
"net/http"
"net/url"
"path"
@@ -203,6 +204,8 @@ func (c *Client) Do(ctx context.Context, method string, urlStr string, opts *Opt
ctx, cncl := context.WithTimeout(ctx, timeout)
defer cncl()
+ slog.Debug("sending request", "method", method, "url", urlStr)
+
// Create request object with the body reader generated from the optional arguments
req, err := http.NewRequestWithContext(ctx, method, urlStr, optionalBodyReader(opts))
if err != nil {
diff --git a/internal/log/rotate.go b/internal/log/rotate.go
index fb93c3c..27907ce 100644
--- a/internal/log/rotate.go
+++ b/internal/log/rotate.go
@@ -10,13 +10,13 @@ import (
var (
// MaxSize is the maximum size in bytes from when to start trimming
- MaxSize int64 = 1024 * 1024
+ MaxSize int64 = 10 * 1024 * 1024
// TrimSize denotes how much to trim from the beginning
TrimSize = MaxSize / 2
// TrimMsg is the message to display when it was trimmed
- TrimMsg = "--- previous part was trimmed by eduvpn-common as the file was too big ---\n"
+ TrimMsg = "--- previous part was trimmed by eduvpn-common as the file was too big (10MB) ---\n"
)
// FileRotater is a file that is trimmed when a maximum size is reached