added ability to configure collector variables using config file (api endpoint, log level, log file).

fixes #124
This commit is contained in:
Jason Kulatunga
2021-04-25 11:24:03 -07:00
parent 59d4a8e195
commit e5713e3a81
4 changed files with 31 additions and 9 deletions
+5
View File
@@ -33,6 +33,11 @@ func (c *configuration) Init() error {
c.SetDefault("devices", []string{})
c.SetDefault("log.level", "INFO")
c.SetDefault("log.file", "")
c.SetDefault("api.endpoint", "http://localhost:8080")
//c.SetDefault("collect.short.command", "-a -o on -S on")
//if you want to load a non-standard location system config file (~/drawbridge.yml), use ReadConfig