crowdsec/cmd/crowdsec-cli
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
..
alerts.go cscli: avoid initializing the db configuration twice (#1982) 2023-01-11 09:50:12 +01:00
alerts_table.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
bouncers.go cscli: avoid initializing the db configuration twice (#1982) 2023-01-11 09:50:12 +01:00
bouncers_table.go cscli: new tables, --color yes|no|auto option (#1763) 2022-10-07 11:05:35 +02:00
capi.go separate cscli cobra constructors: lapi, machines, bouncers, postoverflows (#1945) 2022-12-30 10:13:52 +01:00
collections.go print cscli usage in color, fix windows terminal detection (#1801) 2022-10-13 12:28:24 +02:00
completion.go Windows Support (#1159) 2022-05-17 12:14:59 +02:00
config.go Cscli config refactoring (#1934) 2022-12-22 12:22:55 +01:00
config_backup.go Cscli config refactoring (#1934) 2022-12-22 12:22:55 +01:00
config_restore.go Cscli config refactoring (#1934) 2022-12-22 12:22:55 +01:00
config_show.go Cscli config refactoring (#1934) 2022-12-22 12:22:55 +01:00
console.go Alert context (#1895) 2023-01-04 16:50:02 +01:00
console_table.go Alert context (#1895) 2023-01-04 16:50:02 +01:00
dashboard.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
decisions.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
decisions_table.go print missing "AS" values as empty strings instead of "0 " (#1867) 2022-11-14 09:55:53 +01:00
explain.go cscli explain: add crowdsec path option (#1983) 2023-01-12 17:04:28 +01:00
hub.go print cscli usage in color, fix windows terminal detection (#1801) 2022-10-13 12:28:24 +02:00
hubtest.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
hubtest_table.go rename pkg/cstest -> pkg/hubtest (#1811) 2022-10-17 09:24:07 +02:00
lapi.go Alert context (#1895) 2023-01-04 16:50:02 +01:00
machines.go cscli: avoid initializing the db configuration twice (#1982) 2023-01-11 09:50:12 +01:00
machines_table.go cscli: new tables, --color yes|no|auto option (#1763) 2022-10-07 11:05:35 +02:00
main.go improve feature flag logging (#1986) 2023-01-13 13:42:42 +01:00
main_test.go print cscli usage in color, fix windows terminal detection (#1801) 2022-10-13 12:28:24 +02:00
Makefile make: accept BUILD_VENDOR_FLAGS variable (#1771) 2022-10-04 09:51:35 +02:00
messages.go functional tests, minor refactoring and lint/cleanup (#1570) 2022-06-06 15:24:48 +02:00
metrics.go Allow parsers to capture data for future enrichment (#1969) 2023-01-11 15:01:02 +01:00
metrics_table.go Allow parsers to capture data for future enrichment (#1969) 2023-01-11 15:01:02 +01:00
notifications.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
notifications_table.go cscli: new tables, --color yes|no|auto option (#1763) 2022-10-07 11:05:35 +02:00
parsers.go print cscli usage in color, fix windows terminal detection (#1801) 2022-10-13 12:28:24 +02:00
postoverflows.go separate cscli cobra constructors: lapi, machines, bouncers, postoverflows (#1945) 2022-12-30 10:13:52 +01:00
scenarios.go print cscli usage in color, fix windows terminal detection (#1801) 2022-10-13 12:28:24 +02:00
simulation.go lint: error handling cleanup (#1877) 2022-11-29 09:16:07 +01:00
support.go simplify feature flags (#1947) 2022-12-26 14:23:41 +01:00
tables.go cscli: new tables, --color yes|no|auto option (#1763) 2022-10-07 11:05:35 +02:00
utils.go cscli: avoid initializing the db configuration twice (#1982) 2023-01-11 09:50:12 +01:00
utils_table.go cscli: new tables, --color yes|no|auto option (#1763) 2022-10-07 11:05:35 +02:00