You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual need lies in the fact that underline C library produces warning message to stdout in case API method is not supported on a given database type.
In my particular case I have a code which is intended to work with either country or city databases (yes, still legacy, there are reasons for that) and it tries to derive country code via all possible APIs. It is not quite straight forward to get the database type using the provided APIs.
A PR with a unit test would be good!
I agree it’s the best way to implement this, even if it is not a great API. I don’t think there’s anything worthwhile doing to fix the API, the awkwardness is just the C api shining through.
Ask
It would be great to expose opened database type available via GeoIP.databaseType https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.h#L65.
Actual need lies in the fact that underline C library produces warning message to stdout in case API method is not supported on a given database type.
In my particular case I have a code which is intended to work with either country or city databases (yes, still legacy, there are reasons for that) and it tries to derive country code via all possible APIs. It is not quite straight forward to get the database type using the provided APIs.
Here is a snippet for country code
Possible workaround could be using reflection.
But making it explicit will be a more simple approach.
Pretty similar problem was addressed here syslog-ng/syslog-ng#1446
I am happy to submit PR for that.
The text was updated successfully, but these errors were encountered: