crowdsec/pkg/fflag
mmetc 51800132cd
improve feature flag logging (#1986)
For cscli: it should provide a terse output, not nag users with configuration details. Although it's usually important that cscli and crowdsec have the same enabled features, having it list them every time the command is invoked can be too much.

For crowdsec: when features are set from the environment, it's too early to log where we should. So we can use log.Debug at activation time, and list them again once logging is configured.

 - wrap some functions in csconfig for convenience and DRY
 - for each enabled feature, log.Debug
 - log all enabled features once as Info (crowdsec) or Debug (cscli)
 - file does not exist -> log.Trace
2023-01-13 13:42:42 +01:00
..
crowdsec.go retry with backoff requests to CAPI (#1957) 2023-01-09 14:49:21 +01:00
features.go improve feature flag logging (#1986) 2023-01-13 13:42:42 +01:00
features_test.go improve feature flag logging (#1986) 2023-01-13 13:42:42 +01:00