log
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"log/slog"
|
||||||
"maps"
|
"maps"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -835,6 +836,8 @@ func (c *Client) getActionsServiceAdminConnection(ctx context.Context, rt *regis
|
|||||||
return nil, fmt.Errorf("failed to get actions service admin connection: %w", err)
|
return nil, fmt.Errorf("failed to get actions service admin connection: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slog.Info("got connection", *adminConnection.ActionsServiceURL, c.userAgent)
|
||||||
|
|
||||||
return adminConnection, nil
|
return adminConnection, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
@@ -132,12 +133,13 @@ func (c *commonClient) setSystemInfo(info SystemInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *commonClient) setUserAgent() {
|
func (c *commonClient) setUserAgent() {
|
||||||
// b, _ := json.Marshal(userAgent{
|
b, _ := json.Marshal(userAgent{
|
||||||
// SystemInfo: c.systemInfo,
|
SystemInfo: c.systemInfo,
|
||||||
// BuildVersion: buildInfo.version,
|
BuildVersion: buildInfo.version,
|
||||||
// BuildCommitSHA: buildInfo.commitSHA,
|
BuildCommitSHA: buildInfo.commitSHA,
|
||||||
// })
|
})
|
||||||
c.userAgent = "dockerscaleset"
|
c.userAgent = string(b)
|
||||||
|
slog.Info("user agent", "useragent", c.userAgent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTPOption defines a functional option for configuring the Client.
|
// HTTPOption defines a functional option for configuring the Client.
|
||||||
|
|||||||
Reference in New Issue
Block a user