-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Bug:
When running geoipudate -v, I noticed that it prints to stderr instead of stdout. I ran into this issue when trying to print output to a log file.
Example 1:
geoipupdate -v 1>/var/www/test.txt
terminal:
Using config file /usr/local/etc/GeoIP.conf
Using database directory {DATABASE_DIR}
Performing get filename request to https://updates.maxmind.com/app/update_getfilename?product_id=GeoLite2-City
Acquired lock file lock ({FILE_PATH}/.geoipupdate.lock)
Calculated MD5 sum for {FILE_PATH}/GeoLite2-City.mmdb: d90975ccfa5460d7ee2b2a9a4ebd93ae
Performing update request to https://updates.maxmind.com/geoip/databases/GeoLite2-City/update?db_md5=d90975ccfa5460d7ee2b2a9a4ebd93ae
No new updates available for GeoLite2-City
test.txt:
// empty
Example 2:
geoipupdate -v 2>/var/www/test.txt
terminal:
// empty
test.txt
Using config file /usr/local/etc/GeoIP.conf
Using database directory {DATABASE_DIR}
Performing get filename request to https://updates.maxmind.com/app/update_getfilename?product_id=GeoLite2-City
Acquired lock file lock ({FILE_PATH}/.geoipupdate.lock)
Calculated MD5 sum for {FILE_PATH}/GeoLite2-City.mmdb: d90975ccfa5460d7ee2b2a9a4ebd93ae
Performing update request to https://updates.maxmind.com/geoip/databases/GeoLite2-City/update?db_md5=d90975ccfa5460d7ee2b2a9a4ebd93ae
No new updates available for GeoLite2-City
Possible Solution:
Instead of of using log.Printf() for verbose flag output, use fmt.Printf()
dmitrisky and Dennis14e
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request