Add logging to config

This commit is contained in:
Owen
2025-09-25 17:18:28 -07:00
parent 5f11df8df2
commit 75f6362a90

View File

@@ -6,6 +6,8 @@ import (
"os"
"path/filepath"
"runtime"
"github.com/fosrl/newt/logger"
)
func getConfigPath(clientType string) string {
@@ -34,6 +36,7 @@ func getConfigPath(clientType string) string {
func (c *Client) loadConfig() error {
if c.config.ID != "" && c.config.Secret != "" && c.config.Endpoint != "" {
logger.Debug("Config already provided, skipping loading from file")
return nil
}
@@ -65,6 +68,9 @@ func (c *Client) loadConfig() error {
c.baseURL = config.Endpoint
}
logger.Debug("Loaded config from %s", configPath)
logger.Debug("Config: %+v", c.config)
return nil
}