(configFile string)
| 574 | } |
| 575 | |
| 576 | func loadConfig(configFile string) { |
| 577 | if configFile == "" { |
| 578 | return |
| 579 | } |
| 580 | config := util.GetConfig() |
| 581 | err := config.ReadConfig(configFile) |
| 582 | if err != nil { |
| 583 | if configFile != defaultConfigFile { |
| 584 | fmt.Println(err) |
| 585 | os.Exit(1) |
| 586 | } |
| 587 | return |
| 588 | } |
| 589 | err = logger.SetUpLogging(config) |
| 590 | if err != nil { |
| 591 | fmt.Printf("Logging setup error: %s\n", err) |
| 592 | os.Exit(1) |
| 593 | return |
| 594 | } |
| 595 | log.Info("logging initialized") |
| 596 | } |
| 597 | |
| 598 | type options struct { |
| 599 | OptArgs []string |
no test coverage detected