refactor: use log:set for logs and add global support

This commit is contained in:
Jose Diaz-Gonzalez
2021-01-22 00:39:08 -05:00
parent 6eb0bd8c87
commit afe1e8b33c
11 changed files with 212 additions and 26 deletions

View File

@@ -69,11 +69,8 @@ func CommandReport(appName string, infoFlag string) error {
// CommandSet sets or clears a logs property for an app
func CommandSet(appName string, property string, value string) error {
if property == "vector-sink" && value != "" {
_, err := valueToConfig(appName, value)
if err != nil {
return err
}
if err := validateSetValue(appName, property, value); err != nil {
return err
}
common.CommandPropertySet("logs", appName, property, value, DefaultProperties, GlobalProperties)