Skip to content

Commit 8c7801f

Browse files
feat: add --show-config flag to hide sensitive logs by default (#45)
1 parent a890da5 commit 8c7801f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ variables can be used:
2626

2727
func main() {
2828
var configPath string
29+
var showConfig bool
2930
flag.StringVar(&configPath, "config", "", "The path to a JSON config file.")
31+
flag.BoolVar(&showConfig, "show-config", false, "Show proxy instance configuration on start.")
3032

3133
flag.Usage = func() {
3234
log.Printf("DevCycle Local Bucketing Proxy Version %s\n", Version)
@@ -49,7 +51,9 @@ func main() {
4951
}
5052
// Create router for each instance
5153
for _, instance := range config.Instances {
52-
log.Printf("Creating bucketing proxy instance: %+v", instance)
54+
if showConfig {
55+
log.Printf("Creating bucketing proxy instance: %+v", instance)
56+
}
5357

5458
// Create client
5559
_, err = sdkproxy.NewBucketingProxyInstance(instance)

0 commit comments

Comments
 (0)