Added an option to specify metrics log file

Previously the metrics log file was hardcoded and the broker wasn't
behaving properly if it was unable to open the file for logging.

Added a commandline option to specify the logfile that defaults to
Stdout.

Fixed up some documentation and log output formatting
This commit is contained in:
Cecylia Bocovich 2019-05-10 12:03:07 -04:00
parent 72e54bdc2e
commit ba4fe1a73e
3 changed files with 26 additions and 19 deletions

View file

@ -209,7 +209,8 @@ func GeoIPLoadFile(table GeoIPTable, pathname string) error {
return nil
}
//Returns the country location of an IPv4 or IPv6 address.
//Returns the country location of an IPv4 or IPv6 address, and a boolean value
//that indicates whether the IP address was present in the geoip database
func GetCountryByAddr(table GeoIPTable, ip net.IP) (string, bool) {
table.Lock()